From 2b250033446011e44b4941380af6162295275490 Mon Sep 17 00:00:00 2001 From: Djeeberjr Date: Tue, 14 Sep 2021 15:12:09 +0200 Subject: [PATCH] fixed typo --- .env | 2 +- cmd/s3Browser.go | 4 ++-- internal/s3Broswer.go | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.env b/.env index 0ad09c9..5e98cd0 100644 --- a/.env +++ b/.env @@ -2,7 +2,7 @@ S3_ENDPOINT=localhost:9000 S3_ACCESS_KEY=testo S3_SECRET_KEY=testotesto -S3_BUKET=dev +S3_BUCKET=dev S3_DISABLE_SSL=true ADDRESS=:8080 VERBOSE=true \ No newline at end of file diff --git a/cmd/s3Browser.go b/cmd/s3Browser.go index dda9514..cac681d 100644 --- a/cmd/s3Browser.go +++ b/cmd/s3Browser.go @@ -11,7 +11,7 @@ type args struct { S3Endpoint string `arg:"--s3-endpoint,required,env:S3_ENDPOINT" help:"host[:port]" placeholder:"ENDPOINT"` S3AccessKey string `arg:"--s3-access-key,required,env:S3_ACCESS_KEY" placeholder:"ACCESS_KEY"` S3SecretKey string `arg:"--s3-secret-key,required,env:S3_SECRET_KEY" placeholder:"SECRET_KEY"` - S3Buket string `arg:"--s3-buket,required,env:S3_BUKET" placeholder:"BUKET"` + S3Bucket string `arg:"--s3-bucket,required,env:S3_BUCKET" placeholder:"BUCKET"` S3DisableSSL bool `arg:"--s3-disable-ssl,env:S3_DISABLE_SSL" default:"false"` Address string `arg:"--address,env:ADDRESS" default:":3000" help:"what address to listen on" placeholder:"ADDRESS"` CacheTTL int64 `arg:"--cache-ttl,env:CACHE_TTL" help:"Time in seconds" default:"30" placeholder:"TTL"` @@ -33,7 +33,7 @@ func main() { S3SSL: !args.S3DisableSSL, S3AccessKey: args.S3AccessKey, S3SecretKey: args.S3SecretKey, - S3Buket: args.S3Buket, + S3Bucket: args.S3Bucket, CacheTTL: time.Duration(args.CacheTTL) * time.Second, CacheCleanup: time.Duration(args.CacheCleanup) * time.Second, Address: args.Address, diff --git a/internal/s3Broswer.go b/internal/s3Broswer.go index 985b5fd..757cdb0 100644 --- a/internal/s3Broswer.go +++ b/internal/s3Broswer.go @@ -16,7 +16,7 @@ type AppConfig struct { S3AccessKey string S3SecretKey string S3SSL bool - S3Buket string + S3Bucket string CacheTTL time.Duration CacheCleanup time.Duration Address string @@ -54,14 +54,14 @@ func setupS3Client(config AppConfig) (*minio.Client, error) { return nil, err } - exists, err := minioClient.BucketExists(context.Background(), config.S3Buket) + exists, err := minioClient.BucketExists(context.Background(), config.S3Bucket) if err != nil { return nil, err } if !exists { - return nil, fmt.Errorf("Bucket '%s' does not exist", config.S3Buket) + return nil, fmt.Errorf("Bucket '%s' does not exist", config.S3Bucket) } return minioClient, nil