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
This commit is contained in:
@ -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))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user