-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Migrate to urfave v3 #34510
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
base: main
Are you sure you want to change the base?
Migrate to urfave v3 #34510
Conversation
ensure flags don't carry state through tests
patch smtp idflag persisting
For future: I don't mind you/someone else fixing/editing stuff but a heads up would be nice - especially on a WIP where half of it is hacks to get tests to pass. Either way thanks for some cleanups on this. |
Sorry, I saw it had no progress for long time, and we had some discussions about the strange "config" behavior in discord, so I just tried to fix the problems. Will ask ahead next time. |
No problem, I appreciate your effort regardless. :) |
docs, err := ctx.App.ToMarkdown() | ||
if ctx.Bool("man") { | ||
docs, err = ctx.App.ToMan() | ||
func runDocs(_ context.Context, cmd *cli.Command) error { |
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.
For reviewers: Double check if the docs are correct as the generation is weird, but it might not have the same issue as with tea due to custom help.
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.
Thank you very much, and there are new cool tests
Usage: "Generate self-signed certificate", | ||
Description: `Generate a self-signed X.509 certificate for a TLS server. | ||
// cmdCert represents the available cert sub-command. | ||
func cmdCert() *cli.Command { |
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.
Why use a function instead of a variable here.
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.
Variables keep their state, which isn't an issue during regular usage, but it's annoying for tests.
It completely breaks flags if the command stores them as they keep their state between runs leading to cases where test which expects no --port
flag for example has a --port
flag set from previous run.
update copyright date and remove traceline
migrate cli to urfave v3
add more cli tests