Documentation
¶
Index ¶
- Constants
- Variables
- type Config
- func (c *Config) Close() error
- func (c Config) GetLeftArgs() []string
- func (c Config) GetLeftEnv() []string
- func (c Config) GetLeftPreprocess() []string
- func (c Config) GetLeftSnapshot() string
- func (c Config) GetLeftStdin() string
- func (c Config) GetRightArgs() []string
- func (c Config) GetRightEnv() []string
- func (c Config) GetRightPreprocess() []string
- func (c Config) GetRightSnapshot() string
- func (c Config) GetRightStdin() string
- func (c *Config) Init(args []string) error
- func (c Config) SetupLogger(w io.Writer)
Constants ¶
View Source
const ( StdinMarker = "-" FilePrefix = "@" )
Variables ¶
View Source
var (
ErrConfig = errors.New("Config")
)
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
ShowCmdLog bool `name:"show-cmd-log" usage:"print stdout and stderr of executed subcommands to log output" yaml:"show-cmd-log,omitempty"`
Debug bool `name:"debug" usage:"enable debug log output" yaml:"debug,omitempty"`
DryRun bool `` /* 150-byte string literal not displayed */
// Command list hooks: separated by newline (\n) in env vars to allow quotes/delimiters in scripts safely.
Startup []string `` /* 235-byte string literal not displayed */
Interceptor []string `` /* 263-byte string literal not displayed */
Preprocess []string `` /* 294-byte string literal not displayed */
LeftPreprocess []string `` /* 266-byte string literal not displayed */
RightPreprocess []string `` /* 269-byte string literal not displayed */
Diff string `` /* 172-byte string literal not displayed */
WorkDir string `` /* 157-byte string literal not displayed */
Shell string `name:"shell" default:"bash" usage:"shell executable used to run subcommands" yaml:"shell,omitempty"`
Delimiter string `` /* 149-byte string literal not displayed */
UseLabel bool `` /* 149-byte string literal not displayed */
// Environment variable pairs (KEY=VALUE): separated by comma (,) in env vars.
Env []string `` /* 212-byte string literal not displayed */
LeftEnv []string `` /* 214-byte string literal not displayed */
RightEnv []string `` /* 218-byte string literal not displayed */
Cleanup []string `` /* 229-byte string literal not displayed */
Stdin string `` /* 143-byte string literal not displayed */
LeftStdin string `` /* 142-byte string literal not displayed */
RightStdin string `` /* 145-byte string literal not displayed */
// Snapshot flags: instead of executing the command, use the given input directly as the command output.
// '-' reads from stdin; '@filename' reads from the specified file.
// LeftSnapshot / RightSnapshot take precedence over Snapshot for the respective side.
// If both left and right snapshot to '-', stdin is read once and shared.
Snapshot string `` /* 173-byte string literal not displayed */
LeftSnapshot string `` /* 175-byte string literal not displayed */
RightSnapshot string `` /* 179-byte string literal not displayed */
CommonArgs []string `name:"-" yaml:"common-args,omitempty"`
LeftArgs []string `name:"-" yaml:"left-args,omitempty"`
RightArgs []string `name:"-" yaml:"right-args,omitempty"`
Reader io.Reader `name:"-" json:"-" yaml:"-"`
Writer io.Writer `name:"-" json:"-" yaml:"-"`
TempDir string `name:"-" json:"-" yaml:"-"`
Timeout time.Duration `name:"timeout" usage:"maximum timeout for entire cmdcomp execution (e.g. '30s', '2m')" yaml:"timeout,omitempty"`
ProcessTimeout time.Duration `` /* 139-byte string literal not displayed */
Success bool `` /* 151-byte string literal not displayed */
NoDefault bool `name:"no-default" usage:"disable loading the 'default' configuration from the config file" yaml:"no-default,omitempty"`
ConfigPath string `` /* 155-byte string literal not displayed */
PresetNames []string `` /* 187-byte string literal not displayed */
Version bool `name:"version" usage:"display version and exit" yaml:"-"`
MCP bool `name:"mcp" usage:"start MCP server on stdio" yaml:"-"`
}
func (Config) GetLeftArgs ¶
func (Config) GetLeftEnv ¶ added in v0.2.0
func (Config) GetLeftPreprocess ¶ added in v0.2.0
func (Config) GetLeftSnapshot ¶ added in v0.8.0
GetLeftSnapshot returns the effective snapshot value for the left side. LeftSnapshot takes precedence over Snapshot.
func (Config) GetLeftStdin ¶ added in v0.8.0
func (Config) GetRightArgs ¶
func (Config) GetRightEnv ¶ added in v0.2.0
func (Config) GetRightPreprocess ¶ added in v0.2.0
func (Config) GetRightSnapshot ¶ added in v0.8.0
GetRightSnapshot returns the effective snapshot value for the right side. RightSnapshot takes precedence over Snapshot.
func (Config) GetRightStdin ¶ added in v0.8.0
func (Config) SetupLogger ¶
Click to show internal directories.
Click to hide internal directories.