MCPcopy
hub / github.com/urfave/cli / Value

Method Value

command.go:611–619  ·  view source on GitHub ↗

Value returns the value of the flag corresponding to `name`

(name string)

Source from the content-addressed store, hash-verified

609
610// Value returns the value of the flag corresponding to `name`
611func (cmd *Command) Value(name string) any {
612 if fs := cmd.lookupFlag(name); fs != nil {
613 tracef("value found for name %[1]q (cmd=%[2]q)", name, cmd.Name)
614 return fs.Get()
615 }
616
617 tracef("value NOT found for name %[1]q (cmd=%[2]q)", name, cmd.Name)
618 return nil
619}
620
621// Args returns the command line arguments associated with the
622// command.

Calls 3

lookupFlagMethod · 0.95
tracefFunction · 0.85
GetMethod · 0.65