Skip to content
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

Support loading the secret key from a file #333

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mem
Copy link
Contributor

@mem mem commented Oct 11, 2021

This is related to prometheus/prometheus#8551

Signed-off-by: Marcelo E. Magallon [email protected]

This is related to prometheus/prometheus#8551

Signed-off-by: Marcelo E. Magallon <[email protected]>
@mem mem requested a review from roidelapluie October 11, 2021 21:56
@@ -43,5 +44,12 @@ func (c *SigV4Config) UnmarshalYAML(unmarshal func(interface{}) error) error {
if err := unmarshal((*plain)(c)); err != nil {
return err
}

if len(c.SecretKey) == 0 && len(c.SecretKeyFile) != 0 {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think c.SecretKey == "" is more idiomatic for Go string comparisons.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants