mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Fix utf8 tests (#8192)
* Prevent compiler environment from making the tests fail * Remove unused function * Pass lint
This commit is contained in:
committed by
techknowlogick
parent
73f7e82024
commit
2628b15ee3
@@ -35,7 +35,7 @@ func ToUTF8WithErr(content []byte) (string, error) {
|
||||
}
|
||||
|
||||
// If there is an error, we concatenate the nicely decoded part and the
|
||||
// original left over. This way we won't lose data.
|
||||
// original left over. This way we won't lose much data.
|
||||
result, n, err := transform.Bytes(encoding.NewDecoder(), content)
|
||||
if err != nil {
|
||||
result = append(result, content[n:]...)
|
||||
|
Reference in New Issue
Block a user