aboutsummaryrefslogtreecommitdiffstats
path: root/services/webhook/matrix.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/matrix.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/matrix.go')
-rw-r--r--services/webhook/matrix.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/services/webhook/matrix.go b/services/webhook/matrix.go
index 5dcfdcb0dd..e649a07609 100644
--- a/services/webhook/matrix.go
+++ b/services/webhook/matrix.go
@@ -24,7 +24,7 @@ import (
webhook_module "code.gitea.io/gitea/modules/webhook"
)
-func newMatrixRequest(ctx context.Context, w *webhook_model.Webhook, t *webhook_model.HookTask) (*http.Request, []byte, error) {
+func newMatrixRequest(_ context.Context, w *webhook_model.Webhook, t *webhook_model.HookTask) (*http.Request, []byte, error) {
meta := &MatrixMeta{}
if err := json.Unmarshal([]byte(w.Meta), meta); err != nil {
return nil, nil, fmt.Errorf("GetMatrixPayload meta json: %w", err)