checking in before refactoring interpolation

This commit is contained in:
brent saner
2024-04-11 12:46:13 -04:00
parent 187ad868db
commit eed9c34ebf
17 changed files with 2014 additions and 48 deletions

34
exec_extra/consts.go Normal file
View File

@@ -0,0 +1,34 @@
package exec_extra
var (
StructTagCmdArgs string = "cmdarg"
)
var (
/*
CmdArgsOptPreferShort, if specified, prefers the "short" argument over "long" if both are specified.
The default is to prefer long.
Can be specified per-field via the `prefer_short` option (no value/value ignored).
*/
CmdArgsOptPreferShort cmdArgOpt = func(opts *cmdArgsOpts) (err error) {
opts.preferShort = true
return
}
/*
CmdArgsOptShortEquals, if specified, renders short flags *with* an equals sign
(if using POSIX args).
Has no effect if using Windows traditional syntax or if there is no value for the field.
*/
CmdArgsOptShortEquals cmdArgOpt = func(opts *cmdArgsOpts) (err error) {
opts.preferShort = true
return
}
CmdArgsOptLongNoEquals cmdArgOpt = func(opts *cmdArgsOpts) (err error) {
opts.preferShort = true
return
}
)