-
Notifications
You must be signed in to change notification settings - Fork 12
deps(cli): bumping to urfave/cli/v3 #244
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: master
Are you sure you want to change the base?
Conversation
|
/gemini review |
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.
Code Review
This pull request successfully upgrades the urfave/cli dependency from v2 to v3. The changes correctly address the breaking API changes introduced in v3, such as the new Action signatures, the transition from cli.App to cli.Command, and flag property changes like DisableDefaultText to HideDefault.
The migration appears to be thorough and well-executed across all affected files.
My only piece of feedback concerns the man page generation, which has been removed as urfave/cli/v3 no longer supports it directly. I've left a comment in man/man.go with a suggestion on how to address this functionality regression.
| func GenMan() { | ||
| // man | ||
| man, _ := os.Create(filepath.Join("man", "g.1.gz")) | ||
| s, _ := cli.G.ToMan() | ||
| // compress to gzip | ||
| manGz := gzip.NewWriter(man) | ||
| defer manGz.Close() | ||
| _, _ = manGz.Write([]byte(s)) | ||
| _ = manGz.Flush() | ||
| } |
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 see that the man page generation logic has been removed. This is understandable as urfave/cli/v3 has removed the ToMan() functionality.
This change introduces a functionality regression, as the man page will no longer be generated.
To restore this, you could consider using a third-party library for man page generation, as recommended by the urfave/cli authors. One such library is https://github.com/cpuguy83/go-md2man.
Alternatively, if this functionality is no longer desired, it would be good to remove the GenMan function and its call site in main.go to avoid confusion, as the function is now empty.

No description provided.