From 5a44be627c055d3e9eb406ec4a91579de78b6910 Mon Sep 17 00:00:00 2001 From: guillep2k <18600385+guillep2k@users.noreply.github.com> Date: Thu, 15 Aug 2019 09:07:28 -0300 Subject: Convert files to utf-8 for indexing (#7814) * Convert files to utf-8 for indexing * Move utf8 functions to modules/base * Bump repoIndexerLatestVersion to 3 * Add tests for base/encoding.go * Changes to pass gosimple * Move UTF8 funcs into new modules/charset package --- integrations/migration-test/migration_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'integrations') diff --git a/integrations/migration-test/migration_test.go b/integrations/migration-test/migration_test.go index fd0d0b7c72..858f339b89 100644 --- a/integrations/migration-test/migration_test.go +++ b/integrations/migration-test/migration_test.go @@ -20,6 +20,7 @@ import ( "code.gitea.io/gitea/models" "code.gitea.io/gitea/models/migrations" "code.gitea.io/gitea/modules/base" + "code.gitea.io/gitea/modules/charset" "code.gitea.io/gitea/modules/setting" "github.com/go-xorm/xorm" @@ -106,7 +107,7 @@ func readSQLFromFile(version string) (string, error) { if err != nil { return "", err } - return string(base.RemoveBOMIfPresent(bytes)), nil + return string(charset.RemoveBOMIfPresent(bytes)), nil } func restoreOldDB(t *testing.T, version string) bool { -- cgit v1.2.3