Documentation
¶
Index ¶
Constants ¶
View Source
const TagKey = "flag"
TagKey is the key used to retrieve informations about the flag in the struct field tag. The value associated with the tag key must be a comma separated list of three items:
- the name of the flag
- the default value for the flag
- the usage message for the flag
Variables ¶
This section is empty.
Functions ¶
func SetFromFlags ¶
SetFromFlags sets the value of the fields in the struct contained in s with the value of the flags defined in fs. It uses the tag of the struct fields to determine the fields whose value should be set and to determine the corresponding flag to use.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.