Skip to content

Commit

Permalink
Merge pull request #1439 from hmiyado/fix-timestamp-getvalue
Browse files Browse the repository at this point in the history
Fix timestamp flag error when using help

--

I'm merging this with the codecov patch check failing because this fixes a bug in code that wasn't sufficiently covered prior to the fix. In other words, I don't consider this codecov failure to be specific to this PR.
  • Loading branch information
meatballhat authored Jul 20, 2022
2 parents a91950f + 6d67b2d commit c8147a4
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 c8147a4

Please sign in to comment.