Int returns the integer representation of the flag given by name. It returns 0 if the flag is not an integer type. It panics if the flag is not in the flag set.
(name string)
| 327 | // is not an integer type. It panics if the flag is |
| 328 | // not in the flag set. |
| 329 | func (f Flags) Int(name string) int { |
| 330 | val, _ := strconv.ParseInt(f.String(name), 0, strconv.IntSize) |
| 331 | return int(val) |
| 332 | } |
| 333 | |
| 334 | // Float64 returns the float64 representation of the |
| 335 | // flag given by name. It returns false if the flag |
no test coverage detected