Releases: pborman/options
flags sub package moved
Make the flags sub package more generic
v1.4.1 Make it possible to use other flag packages.
Add support for the standard flag package
This release includes the flags subpackage which is similar to the options package but works with the standard flag package.
The flags subpackage is subject to change at this point.
Minor fix to test code
It appears options_test.go was corrupted causing the build to fail.
Minor usability improvemnts
Make the options package more standalone by adding wrappers for
getopt.PrintUsage
getopt.Usage
getopt.SetParameters
getopt.SetProgram
getopt.SetUsage
And enable setting of getopt global variables with:
SetDisplayWidth
SetHelpColumn
Add SubRegisterAndParse
SubRegisterAndParse
is similar to RegisterAndParse
but the caller provides the arguments and it returns an error rather than exiting the program on error. This is useful when parsing sub commands.
Documentation Update
This is a minor update improving documentation and adding an additional test on using custom types that implment getopt.Value.
Easy Go Option Parsing
This release adds a new type, options.Help to support displaying help. Normal usage is:
var opts = struct {
Help options.Help `getopt:"--help display help"`
...
}
With this, if --help
is provided on the command line the command's usage information will be display on standard output and the command will exit with a status of 0.
Initial release of the options package
This is the initial release of the options package. Future changes should be backwards compatible.