From 1337f6ba63e40f2b29e8f39bc51768b2f9f26582 Mon Sep 17 00:00:00 2001 From: Djeeberjr Date: Thu, 23 Sep 2021 23:54:53 +0200 Subject: [PATCH] bucket not hardcoded --- internal/s3Broswer.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/internal/s3Broswer.go b/internal/s3Broswer.go index 757cdb0..c089210 100644 --- a/internal/s3Broswer.go +++ b/internal/s3Broswer.go @@ -41,7 +41,7 @@ type Directory struct { Directorys []Directory `json:"directorys"` } -var bucketName = "dev" +var bucketName string // setupS3Client connect the s3Client func setupS3Client(config AppConfig) (*minio.Client, error) { @@ -64,6 +64,8 @@ func setupS3Client(config AppConfig) (*minio.Client, error) { return nil, fmt.Errorf("Bucket '%s' does not exist", config.S3Bucket) } + bucketName = config.S3Bucket + return minioClient, nil }