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 /routers/admin/notice.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 'routers/admin/notice.go')
-rw-r--r-- | routers/admin/notice.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/routers/admin/notice.go b/routers/admin/notice.go index ad2bad2163..2ee1b59730 100644 --- a/routers/admin/notice.go +++ b/routers/admin/notice.go @@ -6,13 +6,13 @@ package admin import ( + "strconv" + "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/base" "code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/setting" - - "github.com/unknwon/com" ) const ( @@ -50,7 +50,7 @@ func DeleteNotices(ctx *context.Context) { strs := ctx.QueryStrings("ids[]") ids := make([]int64, 0, len(strs)) for i := range strs { - id := com.StrTo(strs[i]).MustInt64() + id, _ := strconv.ParseInt(strs[i], 10, 64) if id > 0 { ids = append(ids, id) } |