checking in before refactoring interpolation
This commit is contained in:
34
exec_extra/consts.go
Normal file
34
exec_extra/consts.go
Normal 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
|
||||
}
|
||||
)
|
||||
Reference in New Issue
Block a user