-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add region capabilities for s3 destination #26
base: main
Are you sure you want to change the base?
Add region capabilities for s3 destination #26
Conversation
99bf51d
to
e52489e
Compare
pkg/util/env.go
Outdated
@@ -24,3 +24,11 @@ func FallbackToEnv(value string, envName string) string { | |||
} | |||
return value | |||
} | |||
|
|||
func FallbackToDefault(fallback string, envName string) string { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
func FallbackToDefault(fallback string, envName string) string { | |
func EnvWithDefault(name string, d string) string { |
What do you think of changing the order of arguments? It makes more sense in my head 😉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, agree. I just wanted to have some kind of consistency between both util funcs. Makes also more sense to have the fallback as 2nd argument.
e52489e
to
c196844
Compare
@@ -90,6 +90,7 @@ var consulCmd = &cobra.Command{ | |||
DisableSSL: !s3c.UseSSL, | |||
Bucket: s3c.Bucket, | |||
Prefix: prefix, | |||
Region: util.EnvWithDefault("us-east-1", "S3_REGION"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The order of arguments is not correct since you changed the signature 😉
No description provided.