enable staticcheck QFxxxx rules (#34064)
Some checks are pending
release-nightly / nightly-binary (push) Waiting to run
release-nightly / nightly-docker-rootful (push) Waiting to run
release-nightly / nightly-docker-rootless (push) Waiting to run
cron-translations / crowdin-pull (push) Has been skipped

This commit is contained in:
TheFox0x7
2025-03-29 22:32:28 +01:00
committed by GitHub
parent 5564c39105
commit 2a59dfbd47
47 changed files with 179 additions and 143 deletions

View File

@ -86,13 +86,14 @@ func NewMinioStorage(ctx context.Context, cfg *setting.Storage) (ObjectStorage,
log.Info("Creating Minio storage at %s:%s with base path %s", config.Endpoint, config.Bucket, config.BasePath)
var lookup minio.BucketLookupType
if config.BucketLookUpType == "auto" || config.BucketLookUpType == "" {
switch config.BucketLookUpType {
case "auto", "":
lookup = minio.BucketLookupAuto
} else if config.BucketLookUpType == "dns" {
case "dns":
lookup = minio.BucketLookupDNS
} else if config.BucketLookUpType == "path" {
case "path":
lookup = minio.BucketLookupPath
} else {
default:
return nil, fmt.Errorf("invalid minio bucket lookup type: %s", config.BucketLookUpType)
}