NewFlagSet returns a new, empty flag set with the specified name, error handling property and SortFlags set to true.
(name string, errorHandling ErrorHandling)
| 1264 | // NewFlagSet returns a new, empty flag set with the specified name, |
| 1265 | // error handling property and SortFlags set to true. |
| 1266 | func NewFlagSet(name string, errorHandling ErrorHandling) *FlagSet { |
| 1267 | f := &FlagSet{ |
| 1268 | name: name, |
| 1269 | errorHandling: errorHandling, |
| 1270 | argsLenAtDash: -1, |
| 1271 | interspersed: true, |
| 1272 | SortFlags: true, |
| 1273 | } |
| 1274 | return f |
| 1275 | } |
| 1276 | |
| 1277 | // SetInterspersed sets whether to support interspersed option/non-option arguments. |
| 1278 | func (f *FlagSet) SetInterspersed(interspersed bool) { |
no outgoing calls