Documentation
ยถ
Index ยถ
Constants ยถ
This section is empty.
Variables ยถ
var ( // Evaluate merges the secondary command line with the specified flags. // The flags that occur in specified take precedence over those in // secondary. There is a slight complication caused by the fact that // a flag in the specified set may be in the secondary set but in the opposite // form; eg a flag may be in its short from in specified but in long form // in secondary. This is resolved by the knownBy set. The specified set // contains flags in their bare long form (bare as in without dash prefix). Evaluate = clif.Evaluate // Expand returns a slice of strings representing the positional arguments and // flags/options to be executed by the third party program. before and flags // are represented as a ThirdPartyCommandLine. This means that they can be // represented by any slice of strings. However, since before represents // positional args, those args are not expected to include any flags. Those // flags would be specified in the flags parameter. after is optional and // again represents further positional arguments. Expand = clif.Expand )
Functions ยถ
This section is empty.
Types ยถ
type ChangedFlagsMap ยถ
type ChangedFlagsMap = clif.ChangedFlagsMap
ChangedFlagsMap represents the set of third party flags presented by the user on the command line. (NB: Cobra does not currently have a mechanism to collect third party flags, by convention, anything that follows " -- "), therefore we need to collect and handle these flags/options explicitly, which is less than ideal. A difference between ChangedFlagsMap and ThirdPartyCommandLine is that switch flags have a true/false option value in ChangedFlagsMap but not in ThirdPartyCommandLine.
type ExternalThirdParty ยถ
type ExternalThirdParty = clif.ExternalThirdParty
ExternalThirdParty base struct for cli applications using the entry paradigm that need to delegate an invocation to an external third party command.
type KnownByCollection ยถ
type KnownByCollection = clif.KnownByCollection
KnownByCollection collection maps a full flag name to the short name it is also known by. If a flag does not have a short name, it should be mapped to the empty string.
type ThirdPartyChangedFlags ยถ
type ThirdPartyChangedFlags = clif.ThirdPartyChangedFlags
ThirdPartyChangedFlags (see ChangedFlagsMap)
type ThirdPartyCommandLine ยถ
type ThirdPartyCommandLine = clif.ThirdPartyCommandLine
ThirdPartyCommandLine represents the collection of flags used to invoke a third party command. This collection represents the raw flags used for the invocation in the order required by the third party command. It also means that this collection contains the leading --/- not just the names of the flags and options. For example, to invoke the magick command we may want to compose this collection with: magick --strip --interlace plane --gaussian-blur 0.05 and in this case, the list would be defined as a string slice: []string{"--strip", "--interlace", "plane", "--gaussian-blur", "0.05"}
type ThirdPartyFlagKnownBy ยถ
type ThirdPartyFlagKnownBy = clif.ThirdPartyFlagsKnownBy
ThirdPartyFlagKnownBy (see KnownByCollection).
type ThirdPartyFlagName ยถ
type ThirdPartyFlagName = clif.ThirdPartyFlagName
ThirdPartyFlagName raw name of a flag, ie without the leading --/-
type ThirdPartyOptionValue ยถ
type ThirdPartyOptionValue = clif.ThirdPartyOptionValue
ThirdPartyOptionValue the string value of an option. Since this option is being delegated to a third party command, it does not have to be of a particular native go type and can be composed from a go type using the value's String() method.
type ThirdPartyPositional ยถ
type ThirdPartyPositional = clif.ThirdPartyPositional
ThirdPartyPositional represents a positional argument
type ThirdPartyPositionalArgs ยถ
type ThirdPartyPositionalArgs = clif.ThirdPartyPositionalArgs
ThirdPartyPositionalArgs represents a collection of third party positional arguments.
Directories
ยถ
| Path | Synopsis |
|---|---|
|
mocks
Code generated by MockGen.
|
Code generated by MockGen. |
|
cmd
|
|
|
ps-gen
command
ps-gen generates the file param-set-auto.go which contains all the Bind* methods on ParamSet[N].
|
ps-gen generates the file param-set-auto.go which contains all the Bind* methods on ParamSet[N]. |
|
internal
|
|


