Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Destination field to TimestampFlag #1251

Merged
merged 1 commit into from Apr 8, 2021
Merged

Add Destination field to TimestampFlag #1251

merged 1 commit into from Apr 8, 2021

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 rliebz and asahasrabuddhe 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.

None yet

3 participants