aboutsummaryrefslogtreecommitdiffstats
path: root/modules/storage/minio.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/storage/minio.go')
-rw-r--r--modules/storage/minio.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/modules/storage/minio.go b/modules/storage/minio.go
index 6b92be61fb..1c5d25b2d4 100644
--- a/modules/storage/minio.go
+++ b/modules/storage/minio.go
@@ -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)
}