Add embedded interface
This commit is contained in:
@@ -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"`
|
||||
|
||||
Reference in New Issue
Block a user