-
Notifications
You must be signed in to change notification settings - Fork 5
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
Integrate with urfave/cli/v3 APIs #6
Conversation
return nil | ||
} | ||
|
||
func ExampleYAML() { |
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.
You can collapse the code in these 3 examples with a
setupApp(ValueSources..) convenience method.
That way all the examples have to do is pass in the value sources and rest remains the same.
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.
I was hesitant to abstract too much of it because the bodies of these will appear in godoc
documentation but without the setup code or abstracted/shared code 🤔
} | ||
|
||
func unmarshalMap(i any) (ret map[any]any, err error) { | ||
ret = make(map[any]any) |
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.
map[string]any ?
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.
idk; this was a move too 🤔 I was thinking I'd avoid changing the implementation at this time but I can!
@meatballhat That was some nice piece of works. Thanks |
This is essentially a library replacement, given that none of the
InputSourceContext
and flag type wrappers were working without modification and the more recentValueSource
API in urfave/cli/v3 allows for a much simpler (imho) integration.Closes #5