Skip to content

Commit

Permalink
Fix linter issues
Browse files Browse the repository at this point in the history
  • Loading branch information
magiconair committed May 12, 2021
1 parent 1ec58eb commit f999e06
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
6 changes: 3 additions & 3 deletions decode_test.go
Expand Up @@ -269,9 +269,9 @@ func TestDecodeMap(t *testing.T) {
`
out := &X{
A: map[string]string{"foo": "bar", "bar": "bang"},
B: map[string][]string{"foo": []string{"a", "b", "c"}, "bar": []string{"1", "2", "3"}},
C: map[string]map[string]string{"foo": map[string]string{"one": "1", "two": "2"}, "bar": map[string]string{"three": "3", "four": "4"}},
D: map[string]S{"foo": S{"bar"}},
B: map[string][]string{"foo": {"a", "b", "c"}, "bar": {"1", "2", "3"}},
C: map[string]map[string]string{"foo": {"one": "1", "two": "2"}, "bar": {"three": "3", "four": "4"}},
D: map[string]S{"foo": {"bar"}},
E: map[string]int{},
}
testDecode(t, in, &X{}, out)
Expand Down
1 change: 0 additions & 1 deletion parser.go
Expand Up @@ -83,5 +83,4 @@ func (p *parser) recover(errp *error) {
}
*errp = e.(error)
}
return
}
4 changes: 2 additions & 2 deletions properties_test.go
Expand Up @@ -825,7 +825,7 @@ func TestWrite(t *testing.T) {
n, err = p.Write(buf, ISO_8859_1)
}
assert.Equal(t, err, nil)
s := string(buf.Bytes())
s := buf.String()
assert.Equal(t, n, len(test.output), fmt.Sprintf("input=%q expected=%q obtained=%q", test.input, test.output, s))
assert.Equal(t, s, test.output, fmt.Sprintf("input=%q expected=%q obtained=%q", test.input, test.output, s))
}
Expand All @@ -844,7 +844,7 @@ func TestWriteComment(t *testing.T) {
n, err = p.WriteComment(buf, "# ", ISO_8859_1)
}
assert.Equal(t, err, nil)
s := string(buf.Bytes())
s := buf.String()
assert.Equal(t, n, len(test.output), fmt.Sprintf("input=%q expected=%q obtained=%q", test.input, test.output, s))
assert.Equal(t, s, test.output, fmt.Sprintf("input=%q expected=%q obtained=%q", test.input, test.output, s))
}
Expand Down

0 comments on commit f999e06

Please sign in to comment.