Skip to content

Commit

Permalink
api/types: fix empty-lines (revive)
Browse files Browse the repository at this point in the history
Also renamed variables that collided with import

     api/types/strslice/strslice_test.go:36:41: empty-lines: extra empty line at the end of a block (revive)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
  • Loading branch information
thaJeztah committed Sep 27, 2022
1 parent 412c650 commit 3144177
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions api/types/strslice/strslice_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,16 @@ func TestStrSliceUnmarshalJSON(t *testing.T) {
"[]": {},
`["/bin/sh","-c","echo"]`: {"/bin/sh", "-c", "echo"},
}
for json, expectedParts := range parts {
for input, expected := range parts {
strs := StrSlice{"default", "values"}
if err := strs.UnmarshalJSON([]byte(json)); err != nil {
if err := strs.UnmarshalJSON([]byte(input)); err != nil {
t.Fatal(err)
}

actualParts := []string(strs)
if !reflect.DeepEqual(actualParts, expectedParts) {
t.Fatalf("%#v: expected %v, got %v", json, expectedParts, actualParts)
if !reflect.DeepEqual(actualParts, expected) {
t.Fatalf("%#v: expected %v, got %v", input, expected, actualParts)
}

}
}

Expand Down

0 comments on commit 3144177

Please sign in to comment.