Documentation ¶
Index ¶
- func NewTempFile() (*os.File, error)
- func NewTempFileName(extension string) string
- type Arguments
- func (args Arguments) SetBoolean(name string, value bool) Arguments
- func (args Arguments) SetFloat32(name string, value float32) Arguments
- func (args Arguments) SetFloat64(name string, value float64) Arguments
- func (args Arguments) SetInt32(name string, value int32) Arguments
- func (args Arguments) SetInt64(name string, value int64) Arguments
- func (args Arguments) SetString(name string, value string) Arguments
- func (args Arguments) SetUInt32(name string, value uint32) Arguments
- func (args Arguments) SetUInt64(name string, value uint64) Arguments
- type CommandExecutor
- type CommandRenderer
- type ExecutionError
- type ExecutionErrorCode
- type ExecutionResultRecorder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewTempFile ¶
func NewTempFileName ¶
Types ¶
type Arguments ¶
type Arguments map[string]interface{}
Arguments for command execution
func (Arguments) SetFloat32 ¶
func (Arguments) SetFloat64 ¶
type CommandExecutor ¶
Execute command-line tool and write result into writer To simplify interpretation of execution result you can use ExecutionResultRecorder interface and its default implementations
func NewCommandExecutor ¶
func NewCommandExecutor(render CommandRenderer) CommandExecutor
Creates default command executor
type CommandRenderer ¶
Represents command template
func NewAutoNamedRenderer ¶
func NewAutoNamedRenderer(text string) (CommandRenderer, error)
func NewDefaultRenderer ¶
func NewDefaultRenderer(name string, text string) (CommandRenderer, error)
Creates default command renderer based on Go template language
type ExecutionError ¶
type ExecutionError struct { ProcessExitCode int // contains filtered or unexported fields }
Execution error code
type ExecutionErrorCode ¶
type ExecutionErrorCode uint8
type ExecutionResultRecorder ¶
Used to record result of command execution and interpret this result
func NewTempFileRecorder ¶
func NewTempFileRecorder(deleteOnClose bool) (ExecutionResultRecorder, error)
func NewTextRecorder ¶
func NewTextRecorder() ExecutionResultRecorder
Creates a new recorder of command result which interprets process output as text
Click to show internal directories.
Click to hide internal directories.