parseFlags parses the given flags using the given ordered map of all of the available flags, setting the values from that map accordingly. Setting errNotFound to true causes flags that are not in allFlags to trigger an error; otherwise, it just skips those. It is recommended that the [ErrNotFound] a
(flags map[string]string, allFlags *fields, errNotFound bool)
| 281 | // gotten through [getArgs] first, and the map of available flags should |
| 282 | // be gotten through [parseArgs] first. |
| 283 | func parseFlags(flags map[string]string, allFlags *fields, errNotFound bool) error { |
| 284 | for name, value := range flags { |
| 285 | err := parseFlag(name, value, allFlags, errNotFound) |
| 286 | if err != nil { |
| 287 | return err |
| 288 | } |
| 289 | } |
| 290 | return nil |
| 291 | } |
| 292 | |
| 293 | // parseFlag parses the flag with the given name and the given value |
| 294 | // using the given map of all of the available flags, setting the value |
no test coverage detected