Set sets a context flag to a value.
(name, value string)
| 489 | |
| 490 | // Set sets a context flag to a value. |
| 491 | func (cmd *Command) Set(name, value string) error { |
| 492 | if f := cmd.lookupFlag(name); f != nil { |
| 493 | cmd.setMultiValueParsingConfig(f) |
| 494 | return f.Set(name, value) |
| 495 | } |
| 496 | |
| 497 | return fmt.Errorf("no such flag -%s", name) |
| 498 | } |
| 499 | |
| 500 | // IsSet determines if the flag was actually set |
| 501 | func (cmd *Command) IsSet(name string) bool { |