This repository has been archived by the owner on Nov 1, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid using viper.IsSet, which is broken
In some places we need to know whether a flag has been explicitly set. When it was just flags, `pflag.Changed` served this purpose. But `viper.IsSet`, which is supposed to do the same thing over flags, config files, and environment entries, is broken: spf13/viper#276. Therefore: I've made my own isSet predicate, which checks the flags, config and environment individually. Since we can't actually check the environment separately, it has to construct a viper value that _only_ looks at the env, and check that.
- Loading branch information
Showing
2 changed files
with
21 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
git-url: "git@github.com:weaveworks/flux-get-started" | ||
ssh-keygen-dir: "/var/fluxd/keygen" | ||
git-branch: "master" | ||
listen-metrics: ":3031" | ||
memcached-service: "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters