Documentation
¶
Index ¶
- Variables
- func WithDebug(debugOut ...io.Writer) configApply
- func WithEnv(env []string) configApply
- func WithStdErr(writer io.Writer) configApply
- func WithStdIn(reader io.Reader) configApply
- func WithStdOut(writer io.Writer) configApply
- func WithTimeout(timeout time.Duration) configApply
- func WithTimeoutMillis(millis int) configApply
- func WithTimeoutSeconds(seconds int) configApply
- type Cmd
- func (c *Cmd) Run(commandStr string) error
- func (c *Cmd) RunPowershell(commandStr string) error
- func (c *Cmd) RunPowershellWithDir(commandStr string, runDirStr string) error
- func (c *Cmd) RunShell(commandStr string) error
- func (c *Cmd) RunShellWithDir(commandStr string, runDirStr string) error
- func (c *Cmd) RunWithDir(commandStr string, runDirStr string) error
- type DebugLogger
- func (d *DebugLogger) Environment(envCount int)
- func (d *DebugLogger) ExecutionCommand(name string, args []string)
- func (d *DebugLogger) ExecutionCompleted()
- func (d *DebugLogger) ExecutionDirectory(dir string)
- func (d *DebugLogger) ExecutionFailed(err error, isTimeout bool)
- func (d *DebugLogger) ExecutionStart()
- func (d *DebugLogger) ParsedCommand(command string)
- func (d *DebugLogger) StartFailed(err error)
- func (d *DebugLogger) Timeout(timeout time.Duration)
- type Logger
- type NoOpLogger
- func (n *NoOpLogger) Environment(envCount int)
- func (n *NoOpLogger) ExecutionCommand(name string, args []string)
- func (n *NoOpLogger) ExecutionCompleted()
- func (n *NoOpLogger) ExecutionDirectory(dir string)
- func (n *NoOpLogger) ExecutionFailed(err error, isTimeout bool)
- func (n *NoOpLogger) ExecutionStart()
- func (n *NoOpLogger) ParsedCommand(command string)
- func (n *NoOpLogger) StartFailed(err error)
- func (n *NoOpLogger) Timeout(timeout time.Duration)
Constants ¶
This section is empty.
Variables ¶
View Source
var EmptyCmdError = errors.New("empty command")
Functions ¶
func WithStdErr ¶ added in v0.4.0
func WithStdOut ¶ added in v0.4.0
func WithTimeout ¶ added in v0.5.0
func WithTimeoutMillis ¶ added in v0.6.0
func WithTimeoutMillis(millis int) configApply
func WithTimeoutSeconds ¶ added in v0.6.0
func WithTimeoutSeconds(seconds int) configApply
Types ¶
type Cmd ¶
type Cmd struct {
// contains filtered or unexported fields
}
func (*Cmd) RunPowershell ¶ added in v0.2.0
func (*Cmd) RunPowershellWithDir ¶ added in v0.2.0
func (*Cmd) RunShellWithDir ¶ added in v0.2.0
type DebugLogger ¶ added in v0.5.0
type DebugLogger struct {
// contains filtered or unexported fields
}
DebugLogger 실제 디버그 출력을 수행하는 구현체
func NewDebugLogger ¶ added in v0.5.0
func NewDebugLogger(out io.Writer) *DebugLogger
NewDebugLogger DebugLogger 인스턴스를 생성합니다
func (*DebugLogger) Environment ¶ added in v0.5.0
func (d *DebugLogger) Environment(envCount int)
func (*DebugLogger) ExecutionCommand ¶ added in v0.5.0
func (d *DebugLogger) ExecutionCommand(name string, args []string)
func (*DebugLogger) ExecutionCompleted ¶ added in v0.5.0
func (d *DebugLogger) ExecutionCompleted()
func (*DebugLogger) ExecutionDirectory ¶ added in v0.5.0
func (d *DebugLogger) ExecutionDirectory(dir string)
func (*DebugLogger) ExecutionFailed ¶ added in v0.5.0
func (d *DebugLogger) ExecutionFailed(err error, isTimeout bool)
func (*DebugLogger) ExecutionStart ¶ added in v0.5.0
func (d *DebugLogger) ExecutionStart()
func (*DebugLogger) ParsedCommand ¶ added in v0.5.0
func (d *DebugLogger) ParsedCommand(command string)
func (*DebugLogger) StartFailed ¶ added in v0.5.0
func (d *DebugLogger) StartFailed(err error)
func (*DebugLogger) Timeout ¶ added in v0.5.0
func (d *DebugLogger) Timeout(timeout time.Duration)
type Logger ¶ added in v0.5.0
type Logger interface {
ParsedCommand(command string)
ExecutionCommand(name string, args []string)
ExecutionDirectory(dir string)
ExecutionStart()
Timeout(timeout time.Duration)
Environment(envCount int)
StartFailed(err error)
ExecutionFailed(err error, isTimeout bool)
ExecutionCompleted()
}
Logger 디버그 출력을 담당하는 인터페이스
type NoOpLogger ¶ added in v0.5.0
type NoOpLogger struct{}
NoOpLogger 아무것도 하지 않는 로거 구현체 (Null Object Pattern)
func NewNoOpLogger ¶ added in v0.5.0
func NewNoOpLogger() *NoOpLogger
NewNoOpLogger NoOpLogger 인스턴스를 생성합니다
func (*NoOpLogger) Environment ¶ added in v0.5.0
func (n *NoOpLogger) Environment(envCount int)
func (*NoOpLogger) ExecutionCommand ¶ added in v0.5.0
func (n *NoOpLogger) ExecutionCommand(name string, args []string)
func (*NoOpLogger) ExecutionCompleted ¶ added in v0.5.0
func (n *NoOpLogger) ExecutionCompleted()
func (*NoOpLogger) ExecutionDirectory ¶ added in v0.5.0
func (n *NoOpLogger) ExecutionDirectory(dir string)
func (*NoOpLogger) ExecutionFailed ¶ added in v0.5.0
func (n *NoOpLogger) ExecutionFailed(err error, isTimeout bool)
func (*NoOpLogger) ExecutionStart ¶ added in v0.5.0
func (n *NoOpLogger) ExecutionStart()
func (*NoOpLogger) ParsedCommand ¶ added in v0.5.0
func (n *NoOpLogger) ParsedCommand(command string)
func (*NoOpLogger) StartFailed ¶ added in v0.5.0
func (n *NoOpLogger) StartFailed(err error)
func (*NoOpLogger) Timeout ¶ added in v0.5.0
func (n *NoOpLogger) Timeout(timeout time.Duration)
Click to show internal directories.
Click to hide internal directories.