fix: lint

This commit is contained in:
kolaente 2023-12-06 14:01:09 +01:00
parent cca42b9188
commit 6ef1bc3944
Signed by untrusted user: konrad
GPG Key ID: F40E70337AB24C9B
3 changed files with 8 additions and 7 deletions

View File

@ -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

View File

@ -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)
}

View File

@ -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"