Fix for TimestampFlag.GetValue to return empty string without value

main
miyado 2 years ago committed by Dan Buch
parent 0a88df4e46
commit dd9cd61bef
Signed by: meatballhat
GPG Key ID: A12F782281063434

@ -75,7 +75,7 @@ func (t *Timestamp) Get() interface{} {
// GetValue returns the flags value as string representation and an empty
// string if the flag takes no value at all.
func (f *TimestampFlag) GetValue() string {
if f.Value != nil {
if f.Value != nil && f.Value.timestamp != nil {
return f.Value.timestamp.String()
}
return ""

Loading…
Cancel
Save