golangci-lint: misc (#529)

This commit is contained in:
Vincent Serpoul
2021-04-28 08:29:00 +08:00
committed by GitHub
parent 1e80267558
commit 201d5dd422
6 changed files with 235 additions and 84 deletions
+6
View File
@@ -394,7 +394,10 @@ func equalStringsIgnoreNewlines(t *testing.T, expected string, actual string) {
assert.Equal(t, strings.Trim(expected, cutset), strings.Trim(actual, cutset))
}
//nolint:funlen
func TestMarshalIndentTables(t *testing.T) {
t.Parallel()
examples := []struct {
desc string
v interface{}
@@ -443,7 +446,10 @@ root = 'value0'
}
for _, e := range examples {
e := e
t.Run(e.desc, func(t *testing.T) {
t.Parallel()
var buf strings.Builder
enc := toml.NewEncoder(&buf)
enc.SetIndentTables(true)