Documentation
¶
Overview ¶
Package paramset offers helper functions for creating a new param.PSet. You should almost always use the paramset.New(...) function which will create a new param.PSet with the standard helper set up. You would typically pass it a list of param.PSetOptFunc's which can be used, for instance, to add the params to the PSet.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(psof ...param.PSetOptFunc) (*param.PSet, error)
New creates a new PSet with the standard helper set. This is the one you should use in most cases
func NewNoHelp ¶
func NewNoHelp(psof ...param.PSetOptFunc) (*param.PSet, error)
NewNoHelp creates a new PSet with the helper set to the noHelp helper which does nothing. In particular it will not add any parameters and so it returns a suitable parameter set for the case where you want to add positional parameters the last of which is terminal. This style of interface is used if you have a positional parameter which will invoke a different command based on the value - see the 'git' or 'go' commands for examples of this CLI interface style. If you are choosing an interface like this you might want to consider having one of the possible parameter values being "help" so that the available options can be listed.
If errors are detected then they will be reported and the program will exit.
func NewNoHelpNoExit ¶
func NewNoHelpNoExit(psof ...param.PSetOptFunc) (*param.PSet, error)
NewNoHelpNoExit returns a paramset and any errors encountered while creating it. It adds no parameters and doesn't provide a Usage message. It does report errors but doesn't exit if Parse errors are seen.
This is only likely to be of any use for testing purposes
func NewNoHelpNoExitNoErrRpt ¶
func NewNoHelpNoExitNoErrRpt(psof ...param.PSetOptFunc) (*param.PSet, error)
NewNoHelpNoExitNoErrRpt returns a paramset and any errors encountered while creating it. It adds no parameters and doesn't provide a Usage message. It does report errors but doesn't exit if Parse errors are seen.
This is only likely to be of any use for testing purposes
Types ¶
This section is empty.