package
6.2.1
Repository: https://github.com/nickwells/param.mod.git
Documentation: pkg.go.dev

# Functions

AltNames will attach multiple alternative names to the parameter.
Attrs returns an OptFunc which will set the attributes of the parameter to the passed value.
ConfigFileActionFunc can be called as an action func and will take the second entry in the paramVals (which is expected to exist) as the name of a config file from which to take parameters.
ConvertEnvVarNameToParamName converts an environment variable name to a parameter name.
ConvertParamNameToEnvVarName converts a parameter name to a valid environment variable name.
DontExitOnParamSetupErr turns off the standard behaviour of exiting if an error is detected while initialising the param set.
GroupName will set the parameter group name for the parameter.
GroupNameCheck checks that the group name is valid and returns an error if not.
NewSet creates a new PSet with the various maps and slices initialised.
NoteAttrs returns a NoteOptFunc which will set the attributes of the note to The passed value.
NoteSeeNote will add the names of notes to the list of notes to be referenced when showing the help message.
NoteSeeParam will add the names of parameters to the list of parameters to be referenced when showing the help message.
PostAction will return an option function which will add an action function to the list of functions to be called after the value has been set.
SeeAlso will add the names of parameters to the list of parameters to be referenced when showing the help message.
SeeNote will add the names of parameters to the list of parameters to be referenced when showing the help message.
SetAsTerminal is a function which can be passed as a PosOptFunc.
SetErrWriter returns a PSetOptFunc which can be passed to NewSet.
SetHelper returns a PSetOptFunc which can be passed to NewSet.
SetProgramDescription returns a PSetOptFunc which can be passed to NewSet.
SetStdWriter returns a PSetOptFunc which can be passed to NewSet.
SuggestGroups finds those group names the shortest distance from the passed value and returns them.
SuggestNotes finds those note names the shortest distance from the passed value and returns them.
SuggestParams finds those parameter names the shortest distance from the passed value and returns them.
ValueName returns an OptFunc that will set the short value name used in the parameter summary (it follows the "=" after the parameter name).

# Constants

CommandLineOnly means that the parameter can only be set on the command line.
DfltGroupName is the parameter group name that a parameter will have if no explicit group name is given.
DfltProgName is the program name that will be returned if Parse has not yet been called.
DfltTerminalParam is the default value of the parameter that will stop command-line parameters from being processed.
DontShowInStdUsage means that the parameter name will be suppressed when the usage message is printed unless the expanded usage message has been requested.
DontShowNoteInStdUsage means that the note will be suppressed when the usage message is printed unless an expanded usage message has been requested.
IsTerminalParam means that when this parameter is encountered command-line parameter processing will stop.
Mandatory means that a value must follow the parameter.
MustBeSet means that the parameter must be given - it cannot be omitted.
Mandatory means that a value must follow the parameter.
Mandatory means that a value must follow the parameter.
SetOnlyOnce means that only the first time it is set will have any effect and any subsequent attempts to set it will be ignored.
These constants are the location values used to show where parameters are set.
These constants are the location values used to show where parameters are set.
These constants are the location values used to show where parameters are set.

# Structs

ByName represents a parameter which is set by matching a name - it includes details such as: - the parameter name - any alternate names by which it can be set - the name of the group to which it belongs - the action to take when it is observed (typically setting a value) - the description (used in the help message) - the attributes - the place(s) where it has been set - the last one takes precedence This should not be created directly.
ByPos represents a positional parameter.
ConfigFileDetails records the details of a configuration file.
Example records a sample usage and a description for the "Examples" section of the help message.
Group holds details about a group of parameters.
Note records additional text to be attached to the help message which does not sit under any of the other parts.
NullRemHandler is a type which can be set as a remainder handler if you wish to perform the remainder handling yourself after the parsing is complete.
PSet represents a collection of parameters to be parsed together.
Reference records a name and a description for the "See Also" section of the help message.
Source records where a parameter has been set.

# Interfaces

Helper is the interface that a helper object must implement.
RemHandler describes how the remaining parameters should be handled.
Setter is the interface that wraps the necessary methods for a parameter.

# Type aliases

ActionFunc is the type of a function to be called when the ByName parameter is encountered.
Attributes records various flags that can be set on a ByName parameter.
ErrMap is the type used to store the errors recorded when parsing the parameters.
FinalCheckFunc is the type of a function to be called after all the parameters have been set.
NoteAttributes records various flags that can be set on a Note.
NoteOptFunc is the type of an option func used to set various flags etc on a note.
OptFunc is the type of a option func used to set various flags etc on a parameter.
PosOptFunc is the type of a option func used to set various flags on a positional parameter.
PSetOptFunc is the type of a function that can be passed to NewSet.
Sources is a slice of Source.
SuggestionFunc is the type of a function that returns a slice of suggested alternative names for the given string.
ValueReq encodes whether or not a value is required after a parameter.