File: doc.go

package info (click to toggle)
golang-github-thediveo-enumflag 2.0.7-1
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 216 kB
  • sloc: makefile: 18
file content (14 lines) | stat: -rw-r--r-- 560 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/*
Package enumflag supplements the Golang CLI flag handling packages spf13/cobra
and spf13/pflag with enumeration flags.

For instance, users can specify enum flags as “--mode=foo” or “--mode=bar”,
where “foo” and “bar” are valid enumeration values. Other values which are not
part of the set of allowed enumeration values cannot be set and raise CLI flag
errors.

Application programmers then simply deal with enumeration values in form of
uints (or ints), liberated from parsing strings and validating enumeration
flags.
*/
package enumflag