aboutsummaryrefslogtreecommitdiffstats
path: root/services/webhook/discord.go
diff options
context:
space:
mode:
authorsilverwind <me@silverwind.io>2024-06-11 20:47:45 +0200
committerGitHub <noreply@github.com>2024-06-11 18:47:45 +0000
commitfc2d75f86d77b022ece848acf2581c14ef21d43b (patch)
treec95effed84f093643d8408b7cd32123a1114962d /services/webhook/discord.go
parent4bf848a06bfa069e5f381235193924f2b35f2d9d (diff)
downloadgitea-fc2d75f86d77b022ece848acf2581c14ef21d43b.tar.gz
gitea-fc2d75f86d77b022ece848acf2581c14ef21d43b.zip
Enable `unparam` linter (#31277)
Enable [unparam](https://github.com/mvdan/unparam) linter. Often I could not tell the intention why param is unused, so I put `//nolint` for those cases like webhook request creation functions never using `ctx`. --------- Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: delvh <dev.lh@web.de>
Diffstat (limited to 'services/webhook/discord.go')
-rw-r--r--services/webhook/discord.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/services/webhook/discord.go b/services/webhook/discord.go
index 3883ac9eb8..31332396f2 100644
--- a/services/webhook/discord.go
+++ b/services/webhook/discord.go
@@ -260,7 +260,7 @@ type discordConvertor struct {
var _ payloadConvertor[DiscordPayload] = discordConvertor{}
-func newDiscordRequest(ctx context.Context, w *webhook_model.Webhook, t *webhook_model.HookTask) (*http.Request, []byte, error) {
+func newDiscordRequest(_ context.Context, w *webhook_model.Webhook, t *webhook_model.HookTask) (*http.Request, []byte, error) {
meta := &DiscordMeta{}
if err := json.Unmarshal([]byte(w.Meta), meta); err != nil {
return nil, nil, fmt.Errorf("newDiscordRequest meta json: %w", err)