bucket not hardcoded

This commit is contained in:
Djeeberjr 2021-09-23 23:54:53 +02:00
parent 024948b8ff
commit 1337f6ba63

View File

@ -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
}