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
Make *cli.Context implement context.Context by renaming Value #1597
base: v2-maint
Are you sure you want to change the base?
Conversation
given some disagreement with gofmt that seems to have shown up in 1.19
and approve word-wrapping changes to godoc
This allows users to configure the basis for integer parsing.
Co-authored-by: Dan Buch <dan@meatballhat.com>
Co-authored-by: Dan Buch <dan@meatballhat.com>
Co-authored-by: Dan Buch <dan@meatballhat.com>
Co-authored-by: Dan Buch <dan@meatballhat.com>
Co-authored-by: Dan Buch <dan@meatballhat.com>
Co-authored-by: Dan Buch <dan@meatballhat.com>
First cut at using generics for base flag types
@@ -20,6 +20,9 @@ type Context struct { | |||
parentContext *Context | |||
} | |||
|
|||
// ensures that Context always implements context.Context | |||
var _ context.Context = &Context{} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Put this in context_test.go so that it does not effect built binary.
@marwan-at-work Can you rebase main ? |
The description doesn't say WHY you want cli.Context to implement context.Context. What value does this bring? |
This PR changes a lot of code, there are tons of merge conflicts, and v2 is effectively in maintenance mode right now. I'm leaning toward closing this PR, but would like to hear @meatballhat / @dearchap / @Juneezee opinion first. |
This PR runs the
gopls
rename function on the*cli.Context.Value
method to be renamed toGetValue
. This makes the *cli.Context implement context.Context by default as the interface is already embedded into the struct, the only reason it didn't implement it before was because of that method name conflicting in the signature.See #833 (comment)