package
0.0.0-20190806085950-af561f6ff7a1
Repository: https://github.com/kylebanks/go-kit.git
Documentation: pkg.go.dev
# README
storage
-- import "github.com/KyleBanks/go-kit/storage/"
Package storage provides the ability to persist and retrieve structs.
Usage
type FileStore
type FileStore struct {
Dirname string
Filename string
}
FileStore represents a simple on-disk file storage system.
func NewFileStore
func NewFileStore(d, f string) *FileStore
NewFileStore returns an initialized FileStore.
func (FileStore) Load
func (f FileStore) Load(v interface{}) error
Load attempts to read and decode the storage file into the value provided.
func (FileStore) Save
func (f FileStore) Save(v interface{}) error
Save attempts to write the value provided out to the storage file.
# Functions
NewFileStore returns an initialized FileStore.