Help us shape the future of Go! Take the 2026 Go Developer Survey

config

package
v0.14.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 24, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

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) Close

func (c *Config) Close() error

func (Config) GetLeftArgs

func (c Config) GetLeftArgs() []string

func (Config) GetLeftEnv added in v0.2.0

func (c Config) GetLeftEnv() []string

func (Config) GetLeftPreprocess added in v0.2.0

func (c Config) GetLeftPreprocess() []string

func (Config) GetLeftSnapshot added in v0.8.0

func (c Config) GetLeftSnapshot() string

GetLeftSnapshot returns the effective snapshot value for the left side. LeftSnapshot takes precedence over Snapshot.

func (Config) GetLeftStdin added in v0.8.0

func (c Config) GetLeftStdin() string

func (Config) GetRightArgs

func (c Config) GetRightArgs() []string

func (Config) GetRightEnv added in v0.2.0

func (c Config) GetRightEnv() []string

func (Config) GetRightPreprocess added in v0.2.0

func (c Config) GetRightPreprocess() []string

func (Config) GetRightSnapshot added in v0.8.0

func (c Config) GetRightSnapshot() string

GetRightSnapshot returns the effective snapshot value for the right side. RightSnapshot takes precedence over Snapshot.

func (Config) GetRightStdin added in v0.8.0

func (c Config) GetRightStdin() string

func (*Config) Init

func (c *Config) Init(args []string) error

func (Config) SetupLogger

func (c Config) SetupLogger(w io.Writer)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL