Skip to content

Commit

Permalink
Fix for TimestampFlag.GetValue to return empty string without value
Browse files Browse the repository at this point in the history
  • Loading branch information
hmiyado committed Jul 18, 2022
1 parent a91950f commit 6d67b2d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion flag_timestamp.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ func (f *TimestampFlag) GetCategory() string {
// 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 ""
Expand Down

0 comments on commit 6d67b2d

Please sign in to comment.