Documentation ¶
Overview ¶
Package flags implements command-line flag parsing for types that are not part of the standard library flag package, but I consider to be useful.
Index ¶
- func HexColor(name string, value color.Color, usage string) color.Color
- func HexColorVar(c *color.Color, name string, value color.Color, usage string)
- func TextTemplate(name string, value string, usage string) *template.Template
- func TextTemplateVar(t *template.Template, name string, value string, usage string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HexColor ¶
HexColor defines a hex color flag with specified name, default value, and usage string. The return value is the address of an RGBA color variable that stores the value of the flag.
func HexColorVar ¶
HexColorVar defines a hex color flag with specified name, default value, and usage string. The argument c points to an RGBA color variable in which to store the value of the flag.
func TextTemplate ¶
TextTemplate defines a text template flag with specified name, default value, and usage string. The return value is the address of a text template variable that stores the value of the flag. If the given template fails to compile an error will be logged and the program will exit with exit code 2. (os.Exit(2))
func TextTemplateVar ¶
TextTemplateVar defines a text template flag with specified name, default value, and usage string. The argument t points to a text template variable in which to store the value of the flag. If the given template fails to compile an error will be logged and the program will exit with exit code 2. (os.Exit(2))
Types ¶
This section is empty.