diff options
author | Oleksandr Redko <oleksandr.red+github@gmail.com> | 2024-10-30 21:36:24 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-30 19:36:24 +0000 |
commit | f4d3aaeeb9e1b11c5495e4608a3f52f316c35758 (patch) | |
tree | e2601e11bc483e16e07afeaa0c31ad55021fe0d8 /modules/charset/charset_test.go | |
parent | dd1f67491f5e2f798a537a61c082b1bf12e47635 (diff) | |
download | gitea-f4d3aaeeb9e1b11c5495e4608a3f52f316c35758.tar.gz gitea-f4d3aaeeb9e1b11c5495e4608a3f52f316c35758.zip |
refactor: remove redundant err declarations (#32381)
Diffstat (limited to 'modules/charset/charset_test.go')
-rw-r--r-- | modules/charset/charset_test.go | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/modules/charset/charset_test.go b/modules/charset/charset_test.go index 829844a976..19b1303365 100644 --- a/modules/charset/charset_test.go +++ b/modules/charset/charset_test.go @@ -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) |