format code with gofumpt

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn
2022-09-29 17:21:51 +02:00
parent fed93645f1
commit 1da95ff6aa
93 changed files with 199 additions and 177 deletions

View File

@ -143,7 +143,7 @@ func loadSections(config map[string]interface{}, configDetails types.ConfigDetai
Version: schema.Version(config),
}
var loaders = []struct {
loaders := []struct {
key string
fnc func(config map[string]interface{}) error
}{

View File

@ -170,8 +170,10 @@ func toServiceVolumeConfigsSlice(dst reflect.Value, m map[interface{}]interface{
return nil
}
type tomapFn func(s interface{}) (map[interface{}]interface{}, error)
type writeValueFromMapFn func(reflect.Value, map[interface{}]interface{}) error
type (
tomapFn func(s interface{}) (map[interface{}]interface{}, error)
writeValueFromMapFn func(reflect.Value, map[interface{}]interface{}) error
)
func safelyMerge(mergeFn func(dst, src reflect.Value) error) func(dst, src reflect.Value) error {
return func(dst, src reflect.Value) error {

View File

@ -938,7 +938,8 @@ func TestLoadMultipleConfigs(t *testing.T) {
},
CapAdd: []string{"NET_ADMIN", "SYS_ADMIN"},
Environment: types.MappingWithEquals{},
}},
},
},
Networks: map[string]types.NetworkConfig{},
Volumes: map[string]types.VolumeConfig{},
Secrets: map[string]types.SecretConfig{},
@ -1002,7 +1003,8 @@ func TestLoadMultipleNetworks(t *testing.T) {
Name: "foo",
Image: "baz",
Environment: types.MappingWithEquals{},
}},
},
},
Networks: map[string]types.NetworkConfig{
"hostnet": {
Name: "host",