Przeglądaj źródła

libnetwork/datastore: format code with gofumpt

Formatting the code with https://github.com/mvdan/gofumpt

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Sebastiaan van Stijn 3 lat temu
rodzic
commit
eb6437b4db

+ 4 - 2
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 {

+ 3 - 1
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"

+ 2 - 4
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 {