diff --git a/CHANGELOG.md b/CHANGELOG.md index 73e6be221..7c0e99694 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,7 @@ * [CHANGE] Lifecycler: Default value of lifecycler's `final-sleep` is now `0s` (i.e. no sleep). #121 * [CHANGE] Lifecycler: It's now possible to change default value of lifecycler's `final-sleep`. #121 * [CHANGE] Minor cosmetic changes in ring and memberlist HTTP status templates. #149 +* [CHANGE] flagext.Secret: `value` field is no longer exported. Value can be read using `String()` method and set using `Set` method. #154 * [ENHANCEMENT] Add middleware package. #38 * [ENHANCEMENT] Add the ring package #45 * [ENHANCEMENT] Add limiter package. #41 diff --git a/flagext/secret.go b/flagext/secret.go index aa7101b14..8d32649eb 100644 --- a/flagext/secret.go +++ b/flagext/secret.go @@ -1,17 +1,17 @@ package flagext type Secret struct { - Value string + value string } // String implements flag.Value func (v Secret) String() string { - return v.Value + return v.value } // Set implements flag.Value func (v *Secret) Set(s string) error { - v.Value = s + v.value = s return nil } @@ -27,7 +27,7 @@ func (v *Secret) UnmarshalYAML(unmarshal func(interface{}) error) error { // MarshalYAML implements yaml.Marshaler. func (v Secret) MarshalYAML() (interface{}, error) { - if len(v.Value) == 0 { + if len(v.value) == 0 { return "", nil } return "********", nil