1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-19 08:48:37 +00:00

refactor: remove redundant err declarations (#32381)

This commit is contained in:
Oleksandr Redko
2024-10-30 21:36:24 +02:00
committed by GitHub
parent dd1f67491f
commit f4d3aaeeb9
11 changed files with 3 additions and 20 deletions

View File

@@ -40,14 +40,12 @@ func TestMaybeRemoveBOM(t *testing.T) {
func TestToUTF8(t *testing.T) {
resetDefaultCharsetsOrder()
var res string
var err error
// Note: golang compiler seems so behave differently depending on the current
// locale, so some conversions might behave differently. For that reason, we don't
// depend on particular conversions but in expected behaviors.
res, err = ToUTF8([]byte{0x41, 0x42, 0x43}, ConvertOpts{})
res, err := ToUTF8([]byte{0x41, 0x42, 0x43}, ConvertOpts{})
assert.NoError(t, err)
assert.Equal(t, "ABC", res)