Add staticcheck fixes (#3221)

* Add staticcheck fixes

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>

* update golangci-lint version

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>

---------

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
This commit is contained in:
Sanket Sudake
2025-05-18 22:27:45 +05:30
committed by GitHub
parent 6cc6498844
commit 2b13af0a5e
58 changed files with 228 additions and 226 deletions
+3 -3
View File
@@ -53,7 +53,7 @@ const (
// StorageTypeS3 is a constant to hold S3 storage type name literal
StorageTypeS3 StorageType = "s3"
// PaginationSize is a constant to hold no of pages
PaginationSize int = 10
PaginationSize = 10
)
var (
@@ -96,7 +96,7 @@ func getOrCreateContainer(loc stow.Location, containerName string, cursor string
con, err = getContainer(loc, containerName, stow.CursorStart)
}
if con == nil && err == nil {
err = fmt.Errorf("Storage container %s not found", containerName)
err = fmt.Errorf("storage container %s not found", containerName)
}
return con, err
}
@@ -105,7 +105,7 @@ func getOrCreateContainer(loc stow.Location, containerName string, cursor string
func MakeStowClient(logger *zap.Logger, storage Storage) (*StowClient, error) {
storageType := getStorageType(storage)
if strings.Compare(storageType, "local") == 1 && strings.Compare(storageType, "s3") == 1 {
return nil, errors.New("Storage types other than 'local' and 's3' are not implemented")
return nil, errors.New("storage types other than 'local' and 's3' are not implemented")
}
config := &storageConfig{