fix linting (#4)

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2020-11-03 01:08:23 +03:00
committed by GitHub
parent e6ab6d50eb
commit 40b0870cf8
36 changed files with 218 additions and 188 deletions

View File

@@ -10,14 +10,16 @@ import (
var (
// ErrNotFound is returned when a key doesn't exist
ErrNotFound = errors.New("not found")
DefaultStore Store = &NoopStore{opts: NewOptions()}
ErrNotFound = errors.New("not found")
// DefaultStore is the global default store
DefaultStore Store = NewStore()
)
// Store is a data storage interface
type Store interface {
// Init initialises the store. It must perform any required setup on the backing storage implementation and check that it is ready for use, returning any errors.
Init(opts ...Option) error
// Connect is used when store needs to be connected
Connect(ctx context.Context) error
// Options allows you to view the current options.
Options() Options