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

go/cmd/registry/runtime: fix provisioning a runtime without keymanager #2639

Merged
merged 1 commit into from
Feb 4, 2020

Conversation

ptrus
Copy link
Member

@ptrus ptrus commented Feb 4, 2020

vipper.IsSet always returns true if key was bound to a PFlag. Also did check, and this is the only place where we're using viper.IsSet.

Apparently could also use:

flag := cmd.Flags().Lookup("flag-name")
if flag == nil || !flag.Changed {
    continue
}

but this seems clearer?

vipper.IsSet returns true always if key was bound to a PFlag
@ptrus ptrus self-assigned this Feb 4, 2020
@ptrus ptrus merged commit 6a09d57 into master Feb 4, 2020
@ptrus ptrus deleted the ptrus/fix/registry-cmd branch February 4, 2020 10:47
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.

None yet

2 participants