#clvalid
Command clvalid generates a method or func to validate that the value of a closed type is legal.
Download:
go get github.com/jimmyfrasche/closed/cmds/clvalid
If you do not have the go command on your system, you need to Install Go first
usage: clvalid [flags] [importPath] Type
-func
Create a function instead of a method
-name string
The name to use for the func/method
-o filename
The filename to output
-tags build tags
a list of build tags to consider satisfied during the build. For more information about build tags, see the description of build constraints in the documentation for
the go/build package
usage notes:
* importPath is only allowed if Type is not defined in current package.
* if the type is from a different package or cannot have methods, -func is implicit.
* -name defaults to 'legal' for methods and 'legal<Type>' for funcs.
* If -o is not provided it defaults to f_clvalid.go, where f is the name of the file containing the declaration for Type.
Automatically generated by autoreadme on 2018.01.05