Documentation
¶
Overview ¶
Package utils provides a collection of nice flag/flagfile helpers without requiring someone to actually use flagfile.Load() over flag.Parse()
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Setup ¶
func Setup(prefix string, x interface{})
Setup is meant to be called in init or in some other place prior to flagfile.Load() or flags.Parse(). Setup will take a struct and through reflect, create flags for all of the fields in the struct. The given prefix is added to all of the discovered flags. Setup doesn't return any value, but sets up the flag system to mutate the given struct when flag.Parse/flagfile.Load is called.
If a prefix is non-zero length, it is joined with a separating period.
Types ¶
This section is empty.