Improve godoc

This commit is contained in:
Márk Sági-Kazár 2019-07-13 12:04:26 +02:00
parent 275a36d0a0
commit e6d1c6bc9a

View file

@ -226,7 +226,7 @@ func New() *Viper {
return v return v
} }
// Reset: Intended for testing, will reset all to default settings. // Reset is intended for testing, will reset all to default settings.
// In the public interface for the viper package so applications // In the public interface for the viper package so applications
// can use it in their testing as well. // can use it in their testing as well.
func Reset() { func Reset() {
@ -1142,8 +1142,8 @@ func (v *Viper) SetEnvKeyReplacer(r *strings.Replacer) {
v.envKeyReplacer = r v.envKeyReplacer = r
} }
// RegisterAlias: Aliases provide another accessor for the same key. // RegisterAlias creates an alias that provides another accessor for the same key.
// This enables one to change a name without breaking the application // This enables one to change a name without breaking the application.
func RegisterAlias(alias string, key string) { v.RegisterAlias(alias, key) } func RegisterAlias(alias string, key string) { v.RegisterAlias(alias, key) }
func (v *Viper) RegisterAlias(alias string, key string) { func (v *Viper) RegisterAlias(alias string, key string) {
v.registerAlias(alias, strings.ToLower(key)) v.registerAlias(alias, strings.ToLower(key))