Skip to content

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.

@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