format code with gofumpt
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
@ -147,7 +147,6 @@ func convertVolumeToMount(
|
||||
stackVolumes volumes,
|
||||
namespace Namespace,
|
||||
) (mount.Mount, error) {
|
||||
|
||||
switch volume.Type {
|
||||
case "volume", "":
|
||||
return handleVolumeToMount(volume, stackVolumes, namespace)
|
||||
|
||||
@ -100,7 +100,7 @@ func TestInterpolateWithCast(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestPathMatches(t *testing.T) {
|
||||
var testcases = []struct {
|
||||
testcases := []struct {
|
||||
doc string
|
||||
path Path
|
||||
pattern Path
|
||||
|
||||
@ -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
|
||||
}{
|
||||
|
||||
@ -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 {
|
||||
|
||||
@ -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",
|
||||
|
||||
@ -6,8 +6,10 @@ import (
|
||||
"strings"
|
||||
)
|
||||
|
||||
var delimiter = "\\$"
|
||||
var substitution = "[_a-z][_a-z0-9]*(?::?[-?][^}]*)?"
|
||||
var (
|
||||
delimiter = "\\$"
|
||||
substitution = "[_a-z][_a-z0-9]*(?::?[-?][^}]*)?"
|
||||
)
|
||||
|
||||
var patternString = fmt.Sprintf(
|
||||
"%s(?i:(?P<escaped>%s)|(?P<named>%s)|{(?P<braced>%s)}|(?P<invalid>))",
|
||||
|
||||
Reference in New Issue
Block a user