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

Feature:(issue_1927) Add ability for before handler to return new context #1994

Merged
merged 3 commits into from
Oct 30, 2024

Conversation

dearchap
Copy link
Contributor

What type of PR is this?

(REQUIRED)

  • feature

What this PR does / why we need it:

(REQUIRED)

Which issue(s) this PR fixes:

(REQUIRED)

Fixes #1927

Special notes for your reviewer:

(fill-in or delete this section)

Testing

(fill-in or delete this section)

go test -run=TestCommand_Run_BeforeReturnNewContext

Release Notes

(REQUIRED)

The Before handler for a command can optionally return a new context.Context which will then be propagated to the Action and After handlers. 

Copy link
Member

@meatballhat meatballhat left a comment

Choose a reason for hiding this comment

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

I like it! I had the one question and it looks like the docs tests failures are related to the change in func signature.

command.go Show resolved Hide resolved
@dearchap dearchap merged commit 7ec374f into urfave:main Oct 30, 2024
12 of 13 checks passed
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.

Ability to add context values
2 participants