libnetwork/datastore: format code with gofumpt

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

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2022-01-20 14:03:39 +01:00
parent defa8ba7b4
commit eb6437b4db
No known key found for this signature in database
GPG key ID: 76698F39D527CE8C
3 changed files with 9 additions and 7 deletions

View file

@ -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 {

View file

@ -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"

View file

@ -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 {