Add Golangci Lint (#676)
Increase golangci timeout Fix installing golangci-lint in ci Remove mage targets replaced by golangci Run golint in ci Add goheader linter Enable & fix more linters Fix lint issues Add mage target to automagically fix issues found by golangci golangci-lint run --fix Add golangci config Add golangci mage target Co-authored-by: kolaente <k@knt.li> Reviewed-on: https://kolaente.dev/vikunja/api/pulls/676 Co-Authored-By: konrad <konrad@kola-entertainments.de> Co-Committed-By: konrad <konrad@kola-entertainments.de>
This commit is contained in:
@ -18,9 +18,12 @@
|
||||
package redis
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
|
||||
"github.com/go-errors/errors"
|
||||
|
||||
e "code.vikunja.io/api/pkg/modules/keyvalue/error"
|
||||
"code.vikunja.io/api/pkg/red"
|
||||
"encoding/json"
|
||||
"github.com/go-redis/redis/v7"
|
||||
)
|
||||
|
||||
@ -52,7 +55,7 @@ func (s *Storage) Put(key string, value interface{}) (err error) {
|
||||
func (s *Storage) Get(key string) (value interface{}, err error) {
|
||||
b, err := s.client.Get(key).Bytes()
|
||||
if err != nil {
|
||||
if err == redis.Nil {
|
||||
if errors.Is(err, redis.Nil) {
|
||||
return nil, &e.ErrValueNotFoundForKey{Key: key}
|
||||
}
|
||||
return nil, err
|
||||
|
Reference in New Issue
Block a user