mirror of
https://github.com/cloudflare/cloudflared.git
synced 2025-07-28 05:49:57 +00:00
TUN-3963: 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 commit is contained in:
8
vendor/github.com/urfave/cli/v2/flag_float64.go
generated
vendored
8
vendor/github.com/urfave/cli/v2/flag_float64.go
generated
vendored
@@ -87,14 +87,10 @@ func (f *Float64Flag) Apply(set *flag.FlagSet) error {
|
||||
// Float64 looks up the value of a local Float64Flag, returns
|
||||
// 0 if not found
|
||||
func (c *Context) Float64(name string) float64 {
|
||||
if fs := lookupFlagSet(name, c); fs != nil {
|
||||
return lookupFloat64(name, fs)
|
||||
}
|
||||
return 0
|
||||
return lookupFloat64(c.resolveFlagDeep(name))
|
||||
}
|
||||
|
||||
func lookupFloat64(name string, set *flag.FlagSet) float64 {
|
||||
f := set.Lookup(name)
|
||||
func lookupFloat64(f *flag.Flag) float64 {
|
||||
if f != nil {
|
||||
parsed, err := strconv.ParseFloat(f.Value.String(), 64)
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user