MustDeprecatedString returns the string value of a deprecated flag if it was explicitly set or the string value of the new flag. It panics if an error occurs.
(deprecated string, newName string)
| 29 | // explicitly set or the string value of the new flag. |
| 30 | // It panics if an error occurs. |
| 31 | func (f *ParsedFlags) MustDeprecatedString(deprecated string, newName string) string { |
| 32 | if f.Changed(deprecated) { |
| 33 | return f.MustString(deprecated) |
| 34 | } |
| 35 | |
| 36 | return f.MustString(newName) |
| 37 | } |
| 38 | |
| 39 | // MustStringSlice returns the string slice value of a flag given by name. |
| 40 | // It panics if an error occurs. |