-
Notifications
You must be signed in to change notification settings - Fork 91
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
feat: [#653] Update github.com/urfave/cli/v2 to v3 #994
Conversation
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.
Copilot reviewed 6 out of 7 changed files in this pull request and generated no comments.
Files not reviewed (1)
- go.mod: Language not supported
Comments suppressed due to low confidence (1)
console/cli_context.go:218
- Verify that r.instance.Int(key) returns an int64 value as expected in urfave/cli v3; if it returns an int, consider applying an explicit conversion to int64 for consistency in OptionInt64.
return r.instance.Int(key)
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #994 +/- ##
==========================================
+ Coverage 70.04% 70.18% +0.14%
==========================================
Files 168 168
Lines 11353 11428 +75
==========================================
+ Hits 7952 8021 +69
- Misses 3050 3056 +6
Partials 351 351 β View full report in Codecov by Sentry. π New features to boost your workflow:
|
case command.FlagTypeIntSlice: | ||
flag := flag.(*command.IntSliceFlag) | ||
var int64Slice []int64 | ||
for _, v := range flag.Value { | ||
int64Slice = append(int64Slice, int64(v)) | ||
} |
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.
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.
Yeah, itβs definitely weird. In v3, the original int
was replaced with int64
, so the flag no longer returns an int
. I added a conversion in console/application.go
to preserve the original behavior.
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 think Int*
can removed, only keep Int64*
.
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.
Yes, case command.FlagTypeInt
and case command.FlagTypeInt64
can use the same flow (in our framework, still distinguish FlagTypeInt and FlagTypeInt64). The same with slice
.
Improved the flag sorting logic based on the feedback in this comment, ensuring consistent output order. |
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.
Thanks, LGTM
π Description
Closes goravel/goravel#653
β Checks