From 86e07c888245d2c0de4be49a5d5728106b87d5e4 Mon Sep 17 00:00:00 2001 From: Evgeniy Kulikov Date: Tue, 13 Oct 2020 12:43:24 +0300 Subject: [PATCH] [#25] Fix linter warnings closes #25 Signed-off-by: Evgeniy Kulikov --- api/pool/pool.go | 3 +-- auth/errors.go | 17 ----------------- cmd/gate/app-logger.go | 3 +-- cmd/gate/app-settings.go | 1 - 4 files changed, 2 insertions(+), 22 deletions(-) delete mode 100644 auth/errors.go diff --git a/api/pool/pool.go b/api/pool/pool.go index 091604c..dbaa126 100644 --- a/api/pool/pool.go +++ b/api/pool/pool.go @@ -8,9 +8,8 @@ import ( "sync" "time" - "github.com/nspcc-dev/neofs-api-go/pkg/token" - "github.com/nspcc-dev/neofs-api-go/pkg/owner" + "github.com/nspcc-dev/neofs-api-go/pkg/token" "github.com/pkg/errors" "go.uber.org/atomic" "go.uber.org/zap" diff --git a/auth/errors.go b/auth/errors.go deleted file mode 100644 index 4a0dab5..0000000 --- a/auth/errors.go +++ /dev/null @@ -1,17 +0,0 @@ -package auth - -import "fmt" - -const ( - // Minimum length for MinIO access key. - accessKeyMinLen = 3 - - // Minimum length for MinIO secret key for both server and gateway mode. - secretKeyMinLen = 8 -) - -// Common errors generated for access and secret key validation. -var ( - ErrInvalidAccessKeyLength = fmt.Errorf("access key must be minimum %v or more characters long", accessKeyMinLen) - ErrInvalidSecretKeyLength = fmt.Errorf("secret key must be minimum %v or more characters long", secretKeyMinLen) -) diff --git a/cmd/gate/app-logger.go b/cmd/gate/app-logger.go index b3ad7d4..fe772c2 100644 --- a/cmd/gate/app-logger.go +++ b/cmd/gate/app-logger.go @@ -3,11 +3,10 @@ package main import ( "strings" - "google.golang.org/grpc/grpclog" - "github.com/spf13/viper" "go.uber.org/zap" "go.uber.org/zap/zapcore" + "google.golang.org/grpc/grpclog" ) type ( diff --git a/cmd/gate/app-settings.go b/cmd/gate/app-settings.go index 6518c43..eb92491 100644 --- a/cmd/gate/app-settings.go +++ b/cmd/gate/app-settings.go @@ -14,7 +14,6 @@ import ( "time" "github.com/nspcc-dev/neofs-authmate/accessbox/hcs" - crypto "github.com/nspcc-dev/neofs-crypto" "github.com/nspcc-dev/neofs-s3-gate/api/pool" "github.com/nspcc-dev/neofs-s3-gate/auth"