Fix for TimestampFlag.GetValue to return empty string without value
This commit is contained in:
parent
0a88df4e46
commit
dd9cd61bef
@ -75,7 +75,7 @@ func (t *Timestamp) Get() interface{} {
|
|||||||
// GetValue returns the flags value as string representation and an empty
|
// GetValue returns the flags value as string representation and an empty
|
||||||
// string if the flag takes no value at all.
|
// string if the flag takes no value at all.
|
||||||
func (f *TimestampFlag) GetValue() string {
|
func (f *TimestampFlag) GetValue() string {
|
||||||
if f.Value != nil {
|
if f.Value != nil && f.Value.timestamp != nil {
|
||||||
return f.Value.timestamp.String()
|
return f.Value.timestamp.String()
|
||||||
}
|
}
|
||||||
return ""
|
return ""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user