lookup returns the Flag structure of the named flag, returning nil if none exists.
(name NormalizedName)
| 397 | |
| 398 | // lookup returns the Flag structure of the named flag, returning nil if none exists. |
| 399 | func (f *FlagSet) lookup(name NormalizedName) *Flag { |
| 400 | return f.formal[name] |
| 401 | } |
| 402 | |
| 403 | // func to return a given type for a given flag name |
| 404 | func (f *FlagSet) getFlagType(name string, ftype string, convFunc func(sval string) (interface{}, error)) (interface{}, error) { |