From 31441778fa52b8fa8828356679328cc1c9f98c68 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Fri, 23 Sep 2022 20:27:46 +0200 Subject: [PATCH] api/types: fix empty-lines (revive) 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 --- api/types/strslice/strslice_test.go | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/api/types/strslice/strslice_test.go b/api/types/strslice/strslice_test.go index 8a768d49af..56692c38b5 100644 --- a/api/types/strslice/strslice_test.go +++ b/api/types/strslice/strslice_test.go @@ -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) } - } }