1
1
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:
guillep2k
2019-09-21 14:01:34 -03:00
committed by techknowlogick
parent 73f7e82024
commit 2628b15ee3
2 changed files with 79 additions and 33 deletions

View File

@@ -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:]...)