diff --git a/libnetwork/datastore/datastore.go b/libnetwork/datastore/datastore.go index 336e1a5a3f2d972f8f60659422535df5f76b5eee..b7963f04d6a8c6de59103e1e2e9a50a43f7b053f 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 bdd02be1b9c7b0f84ca6cf5cb2918d4d008a60c7..02493bd13e8ba51ea568575ad95391bb9f0b046b 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 6da4104f44f171edbb5cfb93d7762ac0160e2a0e..d6a513815f7e71f75b3d4e7e7f5413f0320d0136 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 {