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

Method realKey

viper.go:1454–1462  ·  view source on GitHub ↗
(key string)

Source from the content-addressed store, hash-verified

1452}
1453
1454func (v *Viper) realKey(key string) string {
1455 newkey, exists := v.aliases[key]
1456 if exists {
1457 v.logger.Debug("key is an alias", "alias", key, "to", newkey)
1458
1459 return v.realKey(newkey)
1460 }
1461 return key
1462}
1463
1464// InConfig checks to see if the given key (or an alias) is in the config file.
1465func InConfig(key string) bool { return v.InConfig(key) }

Callers 5

findMethod · 0.95
registerAliasMethod · 0.95
InConfigMethod · 0.95
SetDefaultMethod · 0.95
SetMethod · 0.95

Calls 1

DebugMethod · 0.80

Tested by

no test coverage detected