mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
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:
@@ -8,6 +8,7 @@ import (
|
||||
"context"
|
||||
"fmt"
|
||||
"net/url"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
@@ -22,8 +23,6 @@ import (
|
||||
"code.gitea.io/gitea/modules/sync"
|
||||
"code.gitea.io/gitea/modules/timeutil"
|
||||
"code.gitea.io/gitea/modules/util"
|
||||
|
||||
"github.com/unknwon/com"
|
||||
)
|
||||
|
||||
// mirrorQueue holds an UniqueQueue object of the mirror
|
||||
@@ -396,11 +395,11 @@ func syncMirror(repoID string) {
|
||||
}()
|
||||
mirrorQueue.Remove(repoID)
|
||||
|
||||
m, err := models.GetMirrorByRepoID(com.StrTo(repoID).MustInt64())
|
||||
id, _ := strconv.ParseInt(repoID, 10, 64)
|
||||
m, err := models.GetMirrorByRepoID(id)
|
||||
if err != nil {
|
||||
log.Error("GetMirrorByRepoID [%s]: %v", repoID, err)
|
||||
return
|
||||
|
||||
}
|
||||
|
||||
log.Trace("SyncMirrors [repo: %-v]: Running Sync", m.Repo)
|
||||
|
Reference in New Issue
Block a user