ref: d30e845485b416e1c48fade14694b12a9fe59b6b
parent: 597e418cb02883418f2cebb41400e8e61413f651
author: Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
date: Sat Mar 23 16:15:06 EDT 2019
Run gofmt -s
--- a/cache/filecache/filecache_config.go
+++ b/cache/filecache/filecache_config.go
@@ -47,11 +47,11 @@
var defaultCacheConfigs = map[string]cacheConfig{cacheKeyGetJSON: defaultCacheConfig,
cacheKeyGetCSV: defaultCacheConfig,
- cacheKeyImages: cacheConfig{+ cacheKeyImages: {MaxAge: -1,
Dir: resourcesGenDir,
},
- cacheKeyAssets: cacheConfig{+ cacheKeyAssets: {MaxAge: -1,
Dir: resourcesGenDir,
},
--- a/parser/metadecoders/decoder_test.go
+++ b/parser/metadecoders/decoder_test.go
@@ -72,7 +72,7 @@
{`#+a: b`, ORG, expect}, {`a = "b"`, TOML, expect}, {`a: "b"`, YAML, expect},- {`a,b,c`, CSV, [][]string{[]string{"a", "b", "c"}}},+ {`a,b,c`, CSV, [][]string{{"a", "b", "c"}}}, {"a: Easy!\nb:\n c: 2\n d: [3, 4]", YAML, map[string]interface{}{"a": "Easy!", "b": map[string]interface{}{"c": 2, "d": []interface{}{3, 4}}}},// errors
{`a = "`, TOML, false},--- a/tpl/collections/complement_test.go
+++ b/tpl/collections/complement_test.go
@@ -37,8 +37,8 @@
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,7 +58,7 @@
{[]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}},@@ -65,8 +65,8 @@
// 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)--- a/tpl/collections/symdiff_test.go
+++ b/tpl/collections/symdiff_test.go
@@ -30,8 +30,8 @@
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 @@
{[]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
--- a/tpl/tplimpl/shortcodes_test.go
+++ b/tpl/tplimpl/shortcodes_test.go
@@ -74,8 +74,8 @@
s := &shortcodeTemplates{ variants: []shortcodeVariant{- shortcodeVariant{variants: []string{"a", "b", "c"}},- shortcodeVariant{variants: []string{"a", "b", "d"}},+ {variants: []string{"a", "b", "c"}},+ {variants: []string{"a", "b", "d"}},},
}
--- a/tpl/transform/unmarshal_test.go
+++ b/tpl/transform/unmarshal_test.go
@@ -119,21 +119,21 @@
assert.Equal("Ford", first[1])}},
{testContentResource{key: "r1", content: `a;b;c`, mime: media.CSVType}, map[string]interface{}{"delimiter": ";"}, func(r [][]string) {- assert.Equal(r, [][]string{[]string{"a", "b", "c"}})+ assert.Equal(r, [][]string{{"a", "b", "c"}})}},
{"a,b,c", nil, func(r [][]string) {- assert.Equal(r, [][]string{[]string{"a", "b", "c"}})+ assert.Equal(r, [][]string{{"a", "b", "c"}})}},
{"a;b;c", map[string]interface{}{"delimiter": ";"}, func(r [][]string) {- assert.Equal(r, [][]string{[]string{"a", "b", "c"}})+ assert.Equal(r, [][]string{{"a", "b", "c"}})}},
{testContentResource{key: "r1", content: `% This is a comment
a;b;c`, mime: media.CSVType}, map[string]interface{}{"DElimiter": ";", "Comment": "%"}, func(r [][]string) {- assert.Equal(r, [][]string{[]string{"a", "b", "c"}})+ assert.Equal(r, [][]string{{"a", "b", "c"}})}},
// errors
--- a/transform/urlreplacers/absurlreplacer_test.go
+++ b/transform/urlreplacers/absurlreplacer_test.go
@@ -160,11 +160,11 @@
tr := transform.New(NewAbsURLTransformer(testBaseURL))
apply(t.Errorf, tr, []test{- test{+ {content: `Link: <a href=/asdf>ASDF</a>`,
expected: `Link: <a href=http://base/asdf>ASDF</a>`,
},
- test{+ {content: `Link: <a href=/asdf >ASDF</a>`,
expected: `Link: <a href=http://base/asdf >ASDF</a>`,
},
--
⑨