MustInt returns the int value of a flag given by name. It panics if an error occurs.
(name string)
| 105 | // MustInt returns the int value of a flag given by name. |
| 106 | // It panics if an error occurs. |
| 107 | func (f *ParsedFlags) MustInt(name string) int { |
| 108 | val, err := f.GetInt(name) |
| 109 | if err != nil { |
| 110 | panic(err) |
| 111 | } |
| 112 | |
| 113 | return val |
| 114 | } |
| 115 | |
| 116 | // MustDeprecatedInt returns the int value of a deprecated flag if it was |
| 117 | // explicitly set or the int value of the new flag. |
no outgoing calls