command

package
v0.55.0 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildCommandContext

func BuildCommandContext(ctx context.Context, shellCmd string) *exec.Cmd

func BuildCommandShellArgContext added in v0.29.1

func BuildCommandShellArgContext(ctx context.Context, shell ShellConfig, cmd string) *exec.Cmd

func ValidateShellConfig added in v0.29.1

func ValidateShellConfig(shell ShellConfig)

Types

type CmdWrapper added in v0.55.0

type CmdWrapper struct {
	Cmd *exec.Cmd
}

func BuildCommandShellArg added in v0.29.1

func BuildCommandShellArg(shell ShellConfig, cmd string) *CmdWrapper

func (*CmdWrapper) ExitCode added in v0.55.0

func (c *CmdWrapper) ExitCode() int

func (*CmdWrapper) Pid added in v0.55.0

func (c *CmdWrapper) Pid() int

func (*CmdWrapper) SetCmdArgs added in v0.55.0

func (c *CmdWrapper) SetCmdArgs()

func (*CmdWrapper) SetDir added in v0.55.0

func (c *CmdWrapper) SetDir(dir string)

func (*CmdWrapper) SetEnv added in v0.55.0

func (c *CmdWrapper) SetEnv(env []string)

func (*CmdWrapper) Start added in v0.55.0

func (c *CmdWrapper) Start() error

func (*CmdWrapper) StderrPipe added in v0.55.0

func (c *CmdWrapper) StderrPipe() (io.ReadCloser, error)

func (*CmdWrapper) StdoutPipe added in v0.55.0

func (c *CmdWrapper) StdoutPipe() (io.ReadCloser, error)

func (*CmdWrapper) Stop added in v0.55.0

func (c *CmdWrapper) Stop(sig int) error

func (*CmdWrapper) Wait added in v0.55.0

func (c *CmdWrapper) Wait() error

type MockCommand added in v0.55.0

type MockCommand struct {
	// contains filtered or unexported fields
}

func NewMockCommand added in v0.55.0

func NewMockCommand() *MockCommand

func (*MockCommand) ExitCode added in v0.55.0

func (c *MockCommand) ExitCode() int

func (*MockCommand) Pid added in v0.55.0

func (c *MockCommand) Pid() int

func (*MockCommand) SetCmdArgs added in v0.55.0

func (c *MockCommand) SetCmdArgs()

func (*MockCommand) SetDir added in v0.55.0

func (c *MockCommand) SetDir(dir string)

func (*MockCommand) SetEnv added in v0.55.0

func (c *MockCommand) SetEnv(env []string)

func (*MockCommand) Start added in v0.55.0

func (c *MockCommand) Start() error

func (*MockCommand) StderrPipe added in v0.55.0

func (c *MockCommand) StderrPipe() (io.ReadCloser, error)

func (*MockCommand) StdoutPipe added in v0.55.0

func (c *MockCommand) StdoutPipe() (io.ReadCloser, error)

func (*MockCommand) Stop added in v0.55.0

func (c *MockCommand) Stop(_ int) error

func (*MockCommand) Wait added in v0.55.0

func (c *MockCommand) Wait() error

type ShellConfig added in v0.29.1

type ShellConfig struct {
	ShellCommand  string `yaml:"shell_command"`
	ShellArgument string `yaml:"shell_argument"`
}

func DefaultShellConfig added in v0.29.1

func DefaultShellConfig() *ShellConfig

Jump to

Keyboard shortcuts

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