diff options
author | 6543 <6543@obermui.de> | 2020-12-25 09:59:32 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-25 11:59:32 +0200 |
commit | a19447aed128ecadfcd938d6a80cd4951af1f4ce (patch) | |
tree | 6312bf946d601aab29731645a4777feeaea66036 /models/repo_unit.go | |
parent | 04ae0f2f3f4556c6d0b4adc5f2cffd0cc7d25151 (diff) | |
download | gitea-a19447aed128ecadfcd938d6a80cd4951af1f4ce.tar.gz gitea-a19447aed128ecadfcd938d6a80cd4951af1f4ce.zip |
migrate from com.* to alternatives (#14103)
* remove github.com/unknwon/com from models
* dont use "com.ToStr()"
* replace "com.ToStr" with "fmt.Sprint" where its easy to do
* more refactor
* fix test
* just "proxy" Copy func for now
* as per @lunny
Diffstat (limited to 'models/repo_unit.go')
-rw-r--r-- | models/repo_unit.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/models/repo_unit.go b/models/repo_unit.go index b208276d9d..8c2d458758 100644 --- a/models/repo_unit.go +++ b/models/repo_unit.go @@ -6,10 +6,10 @@ package models import ( "encoding/json" + "fmt" "code.gitea.io/gitea/modules/timeutil" - "github.com/unknwon/com" "xorm.io/xorm" "xorm.io/xorm/convert" ) @@ -147,7 +147,7 @@ func (r *RepoUnit) BeforeSet(colName string, val xorm.Cell) { case UnitTypeIssues: r.Config = new(IssuesConfig) default: - panic("unrecognized repo unit type: " + com.ToStr(*val)) + panic(fmt.Sprintf("unrecognized repo unit type: %v", *val)) } } } |