From e07cf5b0c9bd2a8f706f497d8e5ab39eb24071fa Mon Sep 17 00:00:00 2001 From: wxiaoguang Date: Sat, 25 Apr 2026 13:56:20 +0800 Subject: [PATCH] fix lint --- routers/api/v1/repo/hook_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/routers/api/v1/repo/hook_test.go b/routers/api/v1/repo/hook_test.go index cca83bf5683..6b2c7627d09 100644 --- a/routers/api/v1/repo/hook_test.go +++ b/routers/api/v1/repo/hook_test.go @@ -4,8 +4,8 @@ package repo import ( - "fmt" "net/http" + "strconv" "testing" "code.gitea.io/gitea/models/db" @@ -29,7 +29,7 @@ func TestTestHook(t *testing.T) { assert.NoError(t, db.Insert(t.Context(), hook)) ctx, _ := contexttest.MockAPIContext(t, "user2/repo1/wiki/_pages") - ctx.SetPathParam("id", fmt.Sprintf("%d", hook.ID)) + ctx.SetPathParam("id", strconv.FormatInt(hook.ID, 10)) contexttest.LoadRepo(t, ctx, 1) contexttest.LoadRepoCommit(t, ctx) contexttest.LoadUser(t, ctx, 2)