Add embedded interface

This commit is contained in:
Archie Fox
2025-03-13 21:32:26 +03:00
parent b16d0da418
commit debf1eec22

View File

@@ -8,11 +8,20 @@ import (
"github.com/fatih/color"
)
type Db interface {
type ByteReader interface {
Read() ([]byte, error)
}
type ByteWriter interface {
Write([]byte)
}
// embedded interface
type Db interface {
ByteReader
ByteWriter
}
type Vault struct {
Accounts []Account `json:"accounts"`
UpdatedAt time.Time `json:"updatedAt"`