File tree Expand file tree Collapse file tree 3 files changed +5
-1
lines changed
Expand file tree Collapse file tree 3 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -595,6 +595,7 @@ type EnvValueSource interface {
595595 IsFromEnv() bool
596596 Key() string
597597}
598+ EnvValueSource is to specifically detect env sources when printing help text
598599
599600type ErrorFormatter interface {
600601 Format(s fmt.State, verb rune)
Original file line number Diff line number Diff line change @@ -595,6 +595,7 @@ type EnvValueSource interface {
595595 IsFromEnv() bool
596596 Key() string
597597}
598+ EnvValueSource is to specifically detect env sources when printing help text
598599
599600type ErrorFormatter interface {
600601 Format(s fmt.State, verb rune)
Original file line number Diff line number Diff line change @@ -17,6 +17,8 @@ type ValueSource interface {
1717 Lookup () (string , bool )
1818}
1919
20+ // EnvValueSource is to specifically detect env sources when
21+ // printing help text
2022type EnvValueSource interface {
2123 IsFromEnv () bool
2224 Key () string
@@ -43,7 +45,7 @@ func (vsc *ValueSourceChain) EnvKeys() []string {
4345 vals := []string {}
4446
4547 for _ , src := range vsc .Chain {
46- if v , ok := src .(EnvValueSource ); ok {
48+ if v , ok := src .(EnvValueSource ); ok && v . IsFromEnv () {
4749 vals = append (vals , v .Key ())
4850 }
4951 }
You can’t perform that action at this time.
0 commit comments