MCPcopy
hub / github.com/spf13/viper / mergeWithEnvPrefix

Method mergeWithEnvPrefix

viper.go:418–424  ·  view source on GitHub ↗
(in string)

Source from the content-addressed store, hash-verified

416}
417
418func (v *Viper) mergeWithEnvPrefix(in string) string {
419 if v.envPrefix != "" {
420 return strings.ToUpper(v.envPrefix + "_" + in)
421 }
422
423 return strings.ToUpper(in)
424}
425
426// AllowEmptyEnv tells Viper to consider set,
427// but empty environment variables as valid values instead of falling back.

Callers 3

BindEnvMethod · 0.95
findMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected