fix: lint
This commit is contained in:
parent
cca42b9188
commit
6ef1bc3944
@ -17,22 +17,22 @@
|
|||||||
package files
|
package files
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"code.vikunja.io/api/pkg/metrics"
|
|
||||||
"code.vikunja.io/api/pkg/modules/keyvalue"
|
|
||||||
"errors"
|
"errors"
|
||||||
"io"
|
"io"
|
||||||
"os"
|
"os"
|
||||||
"strconv"
|
"strconv"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"xorm.io/xorm"
|
|
||||||
|
|
||||||
"code.vikunja.io/api/pkg/config"
|
"code.vikunja.io/api/pkg/config"
|
||||||
"code.vikunja.io/api/pkg/db"
|
"code.vikunja.io/api/pkg/db"
|
||||||
"code.vikunja.io/api/pkg/log"
|
"code.vikunja.io/api/pkg/log"
|
||||||
|
"code.vikunja.io/api/pkg/metrics"
|
||||||
|
"code.vikunja.io/api/pkg/modules/keyvalue"
|
||||||
|
|
||||||
"code.vikunja.io/web"
|
"code.vikunja.io/web"
|
||||||
"github.com/c2h5oh/datasize"
|
"github.com/c2h5oh/datasize"
|
||||||
"github.com/spf13/afero"
|
"github.com/spf13/afero"
|
||||||
|
"xorm.io/xorm"
|
||||||
)
|
)
|
||||||
|
|
||||||
// File holds all information about a file
|
// File holds all information about a file
|
||||||
|
@ -572,7 +572,7 @@ func (s *IncreaseAttachmentCounter) Name() string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Handle is executed when the event IncreaseAttachmentCounter listens on is fired
|
// 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)
|
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
|
// 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)
|
return keyvalue.DecrBy(metrics.AttachmentsCountKey, 1)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -17,15 +17,16 @@
|
|||||||
package routes
|
package routes
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"code.vikunja.io/api/pkg/files"
|
|
||||||
"crypto/subtle"
|
"crypto/subtle"
|
||||||
|
|
||||||
"code.vikunja.io/api/pkg/config"
|
"code.vikunja.io/api/pkg/config"
|
||||||
|
"code.vikunja.io/api/pkg/files"
|
||||||
"code.vikunja.io/api/pkg/log"
|
"code.vikunja.io/api/pkg/log"
|
||||||
"code.vikunja.io/api/pkg/metrics"
|
"code.vikunja.io/api/pkg/metrics"
|
||||||
"code.vikunja.io/api/pkg/models"
|
"code.vikunja.io/api/pkg/models"
|
||||||
auth2 "code.vikunja.io/api/pkg/modules/auth"
|
auth2 "code.vikunja.io/api/pkg/modules/auth"
|
||||||
"code.vikunja.io/api/pkg/user"
|
"code.vikunja.io/api/pkg/user"
|
||||||
|
|
||||||
"github.com/labstack/echo/v4"
|
"github.com/labstack/echo/v4"
|
||||||
"github.com/labstack/echo/v4/middleware"
|
"github.com/labstack/echo/v4/middleware"
|
||||||
"github.com/prometheus/client_golang/prometheus/promhttp"
|
"github.com/prometheus/client_golang/prometheus/promhttp"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user