diff options
author | Bjørn Erik Pedersen <[email protected]> | 2019-03-23 20:15:06 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2019-03-23 20:15:06 +0100 |
commit | d30e845485b416e1c48fade14694b12a9fe59b6b (patch) | |
tree | 614e321fea5d37301ece7aa9eb5f61557343be4e /tpl/collections | |
parent | 597e418cb02883418f2cebb41400e8e61413f651 (diff) | |
download | hugo-d30e845485b416e1c48fade14694b12a9fe59b6b.tar.gz hugo-d30e845485b416e1c48fade14694b12a9fe59b6b.zip |
Run gofmt -s
Diffstat (limited to 'tpl/collections')
-rw-r--r-- | tpl/collections/complement_test.go | 10 | ||||
-rw-r--r-- | tpl/collections/symdiff_test.go | 6 |
2 files changed, 8 insertions, 8 deletions
diff --git a/tpl/collections/complement_test.go b/tpl/collections/complement_test.go index e5edb23d3..07611bd5b 100644 --- a/tpl/collections/complement_test.go +++ b/tpl/collections/complement_test.go @@ -37,8 +37,8 @@ func TestComplement(t *testing.T) { ns := New(&deps.Deps{}) - s1 := []TstX{TstX{A: "a"}, TstX{A: "b"}, TstX{A: "d"}, TstX{A: "e"}} - s2 := []TstX{TstX{A: "b"}, TstX{A: "e"}} + s1 := []TstX{{A: "a"}, {A: "b"}, {A: "d"}, {A: "e"}} + s2 := []TstX{{A: "b"}, {A: "e"}} xa, xb, xd, xe := &StructWithSlice{A: "a"}, &StructWithSlice{A: "b"}, &StructWithSlice{A: "d"}, &StructWithSlice{A: "e"} @@ -58,15 +58,15 @@ func TestComplement(t *testing.T) { {[]interface{}{"a", "b", nil}, []interface{}{[]string{"a", "d"}}, []interface{}{"b", nil}}, {[]int{1, 2, 3, 4, 5}, []interface{}{[]int{1, 3}, []string{"a", "b"}, []int{1, 2}}, []int{4, 5}}, {[]int{1, 2, 3, 4, 5}, []interface{}{[]int64{1, 3}}, []int{2, 4, 5}}, - {s1, []interface{}{s2}, []TstX{TstX{A: "a"}, TstX{A: "d"}}}, + {s1, []interface{}{s2}, []TstX{{A: "a"}, {A: "d"}}}, {sp1, []interface{}{sp2}, []*StructWithSlice{xa, xd}}, {sp1_2, []interface{}{sp2_2}, StructWithSlicePointers{xa, xd}}, // Errors {[]string{"a", "b", "c"}, []interface{}{"error"}, false}, {"error", []interface{}{[]string{"c", "d"}, []string{"a", "b"}}, false}, - {[]string{"a", "b", "c"}, []interface{}{[][]string{[]string{"c", "d"}}}, false}, - {[]interface{}{[][]string{[]string{"c", "d"}}}, []interface{}{[]string{"c", "d"}, []string{"a", "b"}}, false}, + {[]string{"a", "b", "c"}, []interface{}{[][]string{{"c", "d"}}}, false}, + {[]interface{}{[][]string{{"c", "d"}}}, []interface{}{[]string{"c", "d"}, []string{"a", "b"}}, false}, } { errMsg := fmt.Sprintf("[%d]", i) diff --git a/tpl/collections/symdiff_test.go b/tpl/collections/symdiff_test.go index 4024ffe7a..b62fdb73b 100644 --- a/tpl/collections/symdiff_test.go +++ b/tpl/collections/symdiff_test.go @@ -30,8 +30,8 @@ func TestSymDiff(t *testing.T) { ns := New(&deps.Deps{}) - s1 := []TstX{TstX{A: "a"}, TstX{A: "b"}} - s2 := []TstX{TstX{A: "a"}, TstX{A: "e"}} + s1 := []TstX{{A: "a"}, {A: "b"}} + s2 := []TstX{{A: "a"}, {A: "e"}} xa, xb, xd, xe := &StructWithSlice{A: "a"}, &StructWithSlice{A: "b"}, &StructWithSlice{A: "d"}, &StructWithSlice{A: "e"} @@ -48,7 +48,7 @@ func TestSymDiff(t *testing.T) { {[]interface{}{"a", "b", nil}, []interface{}{"a"}, []interface{}{"b", nil}}, {[]int{1, 2, 3}, []int{3, 4}, []int{1, 2, 4}}, {[]int{1, 2, 3}, []int64{3, 4}, []int{1, 2, 4}}, - {s1, s2, []TstX{TstX{A: "b"}, TstX{A: "e"}}}, + {s1, s2, []TstX{{A: "b"}, {A: "e"}}}, {sp1, sp2, []*StructWithSlice{xa, xd}}, // Errors |