diff --git a/libnetwork/datastore/datastore.go b/libnetwork/datastore/datastore.go index 336e1a5a3f..b7963f04d6 100644 --- a/libnetwork/datastore/datastore.go +++ b/libnetwork/datastore/datastore.go @@ -128,8 +128,10 @@ const ( EndpointKeyPrefix = "endpoint" ) -var defaultRootChain = []string{"docker", "network", "v1.0"} -var rootChain = defaultRootChain +var ( + defaultRootChain = []string{"docker", "network", "v1.0"} + rootChain = defaultRootChain +) // DefaultScope returns a default scope config for clients to use. func DefaultScope(dataDir string) ScopeCfg { diff --git a/libnetwork/datastore/datastore_test.go b/libnetwork/datastore/datastore_test.go index bdd02be1b9..02493bd13e 100644 --- a/libnetwork/datastore/datastore_test.go +++ b/libnetwork/datastore/datastore_test.go @@ -207,6 +207,7 @@ type recStruct struct { func (r *recStruct) Key() []string { return []string{"recStruct"} } + func (r *recStruct) Value() []byte { b, err := json.Marshal(r) if err != nil { @@ -249,7 +250,8 @@ func dummyKVObject(id string, retValue bool) *dummyObject { DBIndex: 0, ReturnValue: retValue, DBExists: false, - SkipSave: false} + SkipSave: false, + } generic := make(map[string]interface{}) generic["label1"] = &recStruct{"value1", 1, cDict, 0, false, false} generic["label2"] = "subnet=10.1.1.0/16" diff --git a/libnetwork/datastore/mock_store.go b/libnetwork/datastore/mock_store.go index 6da4104f44..d6a513815f 100644 --- a/libnetwork/datastore/mock_store.go +++ b/libnetwork/datastore/mock_store.go @@ -7,10 +7,8 @@ import ( "github.com/docker/docker/libnetwork/types" ) -var ( - // ErrNotImplemented exported - ErrNotImplemented = errors.New("Functionality not implemented") -) +// ErrNotImplemented exported +var ErrNotImplemented = errors.New("Functionality not implemented") // MockData exported type MockData struct {