api/types: 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 13:49:27 +01:00
parent b9833a2059
commit 3146ecbae6
No known key found for this signature in database
GPG key ID: 76698F39D527CE8C
2 changed files with 65 additions and 37 deletions

View file

@ -155,7 +155,6 @@ func TestUTSMode(t *testing.T) {
assert.Check(t, is.Equal(mode.IsHost(), expected.host))
assert.Check(t, is.Equal(mode.Valid(), expected.valid))
})
}
}

View file

@ -164,13 +164,17 @@ func TestArgsMatchKVList(t *testing.T) {
matches := map[*Args]string{
{}: "field",
{map[string]map[string]bool{
"created": {"today": true},
"labels": {"key1": true}},
{
map[string]map[string]bool{
"created": {"today": true},
"labels": {"key1": true},
},
}: "labels",
{map[string]map[string]bool{
"created": {"today": true},
"labels": {"key1=value1": true}},
{
map[string]map[string]bool{
"created": {"today": true},
"labels": {"key1=value1": true},
},
}: "labels",
}
@ -181,16 +185,22 @@ func TestArgsMatchKVList(t *testing.T) {
}
differs := map[*Args]string{
{map[string]map[string]bool{
"created": {"today": true}},
{
map[string]map[string]bool{
"created": {"today": true},
},
}: "created",
{map[string]map[string]bool{
"created": {"today": true},
"labels": {"key4": true}},
{
map[string]map[string]bool{
"created": {"today": true},
"labels": {"key4": true},
},
}: "labels",
{map[string]map[string]bool{
"created": {"today": true},
"labels": {"key1=value3": true}},
{
map[string]map[string]bool{
"created": {"today": true},
"labels": {"key1=value3": true},
},
}: "labels",
}
@ -206,20 +216,30 @@ func TestArgsMatch(t *testing.T) {
matches := map[*Args]string{
{}: "field",
{map[string]map[string]bool{
"created": {"today": true}},
{
map[string]map[string]bool{
"created": {"today": true},
},
}: "today",
{map[string]map[string]bool{
"created": {"to*": true}},
{
map[string]map[string]bool{
"created": {"to*": true},
},
}: "created",
{map[string]map[string]bool{
"created": {"to(.*)": true}},
{
map[string]map[string]bool{
"created": {"to(.*)": true},
},
}: "created",
{map[string]map[string]bool{
"created": {"tod": true}},
{
map[string]map[string]bool{
"created": {"tod": true},
},
}: "created",
{map[string]map[string]bool{
"created": {"anything": true, "to*": true}},
{
map[string]map[string]bool{
"created": {"anything": true, "to*": true},
},
}: "created",
}
@ -229,21 +249,31 @@ func TestArgsMatch(t *testing.T) {
}
differs := map[*Args]string{
{map[string]map[string]bool{
"created": {"tomorrow": true}},
{
map[string]map[string]bool{
"created": {"tomorrow": true},
},
}: "created",
{map[string]map[string]bool{
"created": {"to(day": true}},
{
map[string]map[string]bool{
"created": {"to(day": true},
},
}: "created",
{map[string]map[string]bool{
"created": {"tom(.*)": true}},
{
map[string]map[string]bool{
"created": {"tom(.*)": true},
},
}: "created",
{map[string]map[string]bool{
"created": {"tom": true}},
{
map[string]map[string]bool{
"created": {"tom": true},
},
}: "created",
{map[string]map[string]bool{
"created": {"today1": true},
"labels": {"today": true}},
{
map[string]map[string]bool{
"created": {"today1": true},
"labels": {"today": true},
},
}: "created",
}
@ -532,5 +562,4 @@ func TestGetBoolOrDefault(t *testing.T) {
assert.Check(t, is.Equal(tC.expectedValue, value))
})
}
}