From 6ef1bc3944980588238fb44295b520695a4ed19a Mon Sep 17 00:00:00 2001 From: kolaente Date: Wed, 6 Dec 2023 14:01:09 +0100 Subject: [PATCH] fix: lint --- pkg/files/files.go | 8 ++++---- pkg/models/listeners.go | 4 ++-- pkg/routes/metrics.go | 3 ++- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/pkg/files/files.go b/pkg/files/files.go index f30f91b5ce0..b61f723088a 100644 --- a/pkg/files/files.go +++ b/pkg/files/files.go @@ -17,22 +17,22 @@ package files import ( - "code.vikunja.io/api/pkg/metrics" - "code.vikunja.io/api/pkg/modules/keyvalue" "errors" "io" "os" "strconv" "time" - "xorm.io/xorm" - "code.vikunja.io/api/pkg/config" "code.vikunja.io/api/pkg/db" "code.vikunja.io/api/pkg/log" + "code.vikunja.io/api/pkg/metrics" + "code.vikunja.io/api/pkg/modules/keyvalue" + "code.vikunja.io/web" "github.com/c2h5oh/datasize" "github.com/spf13/afero" + "xorm.io/xorm" ) // File holds all information about a file diff --git a/pkg/models/listeners.go b/pkg/models/listeners.go index 5b302da55a8..67c64873df6 100644 --- a/pkg/models/listeners.go +++ b/pkg/models/listeners.go @@ -572,7 +572,7 @@ func (s *IncreaseAttachmentCounter) Name() string { } // Handle is executed when the event IncreaseAttachmentCounter listens on is fired -func (s *IncreaseAttachmentCounter) Handle(msg *message.Message) (err error) { +func (s *IncreaseAttachmentCounter) Handle(_ *message.Message) (err error) { return keyvalue.IncrBy(metrics.AttachmentsCountKey, 1) } @@ -586,7 +586,7 @@ func (s *DecreaseAttachmentCounter) Name() string { } // Handle is executed when the event DecreaseAttachmentCounter listens on is fired -func (s *DecreaseAttachmentCounter) Handle(msg *message.Message) (err error) { +func (s *DecreaseAttachmentCounter) Handle(_ *message.Message) (err error) { return keyvalue.DecrBy(metrics.AttachmentsCountKey, 1) } diff --git a/pkg/routes/metrics.go b/pkg/routes/metrics.go index c0254c10368..0f383d34d9f 100644 --- a/pkg/routes/metrics.go +++ b/pkg/routes/metrics.go @@ -17,15 +17,16 @@ package routes import ( - "code.vikunja.io/api/pkg/files" "crypto/subtle" "code.vikunja.io/api/pkg/config" + "code.vikunja.io/api/pkg/files" "code.vikunja.io/api/pkg/log" "code.vikunja.io/api/pkg/metrics" "code.vikunja.io/api/pkg/models" auth2 "code.vikunja.io/api/pkg/modules/auth" "code.vikunja.io/api/pkg/user" + "github.com/labstack/echo/v4" "github.com/labstack/echo/v4/middleware" "github.com/prometheus/client_golang/prometheus/promhttp"