Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@davidsbond
Copy link
Contributor

What type of PR is this?

  • bug
  • cleanup
  • documentation
  • feature

What this PR does / why we need it:

Adds a Destination field for the TimestampFlag type that allows you to specify a pointer to
a Timestamp rather than having to grab the Timestamp from the cli.Context using the flag
name.

Also updates the expect test helper to not use runtime.Caller etc directly. Instead, it calls t.Helper beforehand, which does the same thing. This is optional, but I think removes some unnecessary code. Happy to omit if preferred.

Testing

Added a unit test TestTimestampFlagApply_WithDestination

Release Notes

Adds Destination field to TimestampFlag

Adds a `Destination` field for the `TimestampFlag` type that allows you to specify a pointer to
a `Timestamp` rather than having to grab the `Timestamp` from the `cli.Context` using the flag
name.
@davidsbond davidsbond requested a review from a team as a code owner March 7, 2021 03:45
@davidsbond davidsbond requested review from asahasrabuddhe and rliebz and removed request for a team March 7, 2021 03:45
Copy link
Member

@rliebz rliebz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for putting this together!

Copy link
Member

@asahasrabuddhe asahasrabuddhe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rliebz rliebz merged commit 45952a7 into urfave:master Apr 8, 2021
@davidsbond davidsbond deleted the timestamp-destination branch April 8, 2021 23:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants