mirror of
https://github.com/cloudflare/cloudflared.git
synced 2025-07-28 06:29:59 +00:00
TUN-3964: Revert "TUN-3922: Repoint urfave/cli/v2 library at patched branch at github.com/ipostelnik/cli/v2@fixed which correctly handles reading flags declared at multiple levels of subcommands."
This reverts commit 1670ee87fb
.
This commit is contained in:

committed by
Chung Ting Huang

parent
e9c2afec56
commit
9d5bd256be
8
vendor/github.com/urfave/cli/v2/flag_int.go
generated
vendored
8
vendor/github.com/urfave/cli/v2/flag_int.go
generated
vendored
@@ -87,10 +87,14 @@ func (f *IntFlag) Apply(set *flag.FlagSet) error {
|
||||
// Int looks up the value of a local IntFlag, returns
|
||||
// 0 if not found
|
||||
func (c *Context) Int(name string) int {
|
||||
return lookupInt(c.resolveFlagDeep(name))
|
||||
if fs := lookupFlagSet(name, c); fs != nil {
|
||||
return lookupInt(name, fs)
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func lookupInt(f *flag.Flag) int {
|
||||
func lookupInt(name string, set *flag.FlagSet) int {
|
||||
f := set.Lookup(name)
|
||||
if f != nil {
|
||||
parsed, err := strconv.ParseInt(f.Value.String(), 0, 64)
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user