Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrInvalidArgument = stderrors.New("invalid argument")
ErrInvalidArgument is the error returned by ParseFlags or FromYAMLFile if its parsing result cannot be stored in the value pointed to by the designated passed argument which must be a non-nil pointer.
Functions ¶
func FromYAMLFile ¶
FromYAMLFile parses the given YAML file and stores the result in the value pointed to by v. If v is nil or not a pointer, FromYAMLFile returns an ErrInvalidArgument error.
func ParseFlags ¶
ParseFlags parses CLI flags and stores the result in the value pointed to by v. If v is nil or not a pointer, ParseFlags returns an ErrInvalidArgument error. ParseFlags adds a default Help Options group, which contains the options -h and --help. If either option is specified on the command line, ParseFlags prints the help message to os.Stdout and exits. Note that errors are not printed automatically, so error handling is the sole responsibility of the caller.