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

Function RegisterAlias

viper.go:1416–1416  ·  view source on GitHub ↗

RegisterAlias creates an alias that provides another accessor for the same key. This enables one to change a name without breaking the application.

(alias, key string)

Source from the content-addressed store, hash-verified

1414// RegisterAlias creates an alias that provides another accessor for the same key.
1415// This enables one to change a name without breaking the application.
1416func RegisterAlias(alias, key string) { v.RegisterAlias(alias, key) }
1417
1418func (v *Viper) RegisterAlias(alias, key string) {
1419 v.registerAlias(alias, strings.ToLower(key))

Callers

nothing calls this directly

Calls 1

RegisterAliasMethod · 0.80

Tested by

no test coverage detected