diff --git a/flags.go b/flags.go index dd32f4e..b5ddbf5 100644 --- a/flags.go +++ b/flags.go @@ -36,7 +36,7 @@ type pflagValue struct { flag *pflag.Flag } -// HasChanges returns whether the flag has changes or not. +// HasChanged returns whether the flag has changes or not. func (p pflagValue) HasChanged() bool { return p.flag.Changed } diff --git a/viper.go b/viper.go index 859a86f..5c441b4 100644 --- a/viper.go +++ b/viper.go @@ -226,7 +226,7 @@ func New() *Viper { return v } -// Intended for testing, will reset all to default settings. +// Reset: Intended for testing, will reset all to default settings. // In the public interface for the viper package so applications // can use it in their testing as well. func Reset() { @@ -1142,7 +1142,7 @@ func (v *Viper) SetEnvKeyReplacer(r *strings.Replacer) { v.envKeyReplacer = r } -// Aliases provide another accessor for the same key. +// RegisterAlias: Aliases provide another accessor for the same key. // This enables one to change a name without breaking the application func RegisterAlias(alias string, key string) { v.RegisterAlias(alias, key) } func (v *Viper) RegisterAlias(alias string, key string) { diff --git a/viper_test.go b/viper_test.go index 75afaae..f91791f 100644 --- a/viper_test.go +++ b/viper_test.go @@ -1774,7 +1774,7 @@ func BenchmarkGet(b *testing.B) { } } -// This is the "perfect result" for the above. +// BenchmarkGetBoolFromMap is the "perfect result" for the above. func BenchmarkGetBoolFromMap(b *testing.B) { m := make(map[string]bool) key := "BenchmarkGetBool"