Documentation
¶
Index ¶
- Variables
- func NewUnsupportedIncludePrevArgsError(value IncludePrevArgs) error
- type CobraOut
- type Executable
- type IncludePrevArgs
- type Option
- func WithArgs(args ...string) Option
- func WithArgsIncludePrevious(includePrevArgs IncludePrevArgs, args ...string) Option
- func WithCobraIn(cmd *cobra.Command) Option
- func WithCobraOut(cmd CobraOut) Option
- func WithCustomIn(in io.Reader) Option
- func WithCustomOut(out, err io.Writer) Option
- func WithEnv[E itbasisCoreEnv.ListOrMap](env E) Option
- func WithOsPwd() Option
- func WithStdIn() Option
- func WithStdOut() Option
- func WithWorkDir(dir string) Option
- type RestoreOption
- type UnsupportedIncludePrevArgsError
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrFailedExecuteCommand = errors.New("execute command failed")
)
Functions ¶
func NewUnsupportedIncludePrevArgsError ¶
func NewUnsupportedIncludePrevArgsError(value IncludePrevArgs) error
Types ¶
type Executable ¶
type Executable struct {
// contains filtered or unexported fields
}
func NewExecutable ¶
func (*Executable) Execute ¶
func (ge *Executable) Execute(ctx context.Context, opts ...RestoreOption) error
type IncludePrevArgs ¶
type IncludePrevArgs int
const ( IncludePrevArgsNo IncludePrevArgs = iota IncludePrevArgsBefore IncludePrevArgs = iota IncludePrevArgsAfter IncludePrevArgs = iota )
type Option ¶
type Option = itbasisCoreOption.Option[exec.Cmd]
func WithArgsIncludePrevious ¶
func WithArgsIncludePrevious(includePrevArgs IncludePrevArgs, args ...string) Option
func WithCobraIn ¶
func WithCobraOut ¶
func WithCustomIn ¶
func WithCustomOut ¶
func WithEnv ¶
func WithEnv[E itbasisCoreEnv.ListOrMap](env E) Option
func WithStdOut ¶
func WithStdOut() Option
func WithWorkDir ¶
type RestoreOption ¶
type RestoreOption = itbasisCoreOption.RestoreOption[exec.Cmd]
func WithRerun ¶
func WithRerun() RestoreOption
func WithRestoreArgs ¶
func WithRestoreArgs(args ...string) RestoreOption
func WithRestoreArgsIncludePrevious ¶
func WithRestoreArgsIncludePrevious(includePrevArgs IncludePrevArgs, args ...string) RestoreOption
func WithRestoreEnv ¶
func WithRestoreEnv[E itbasisCoreEnv.ListOrMap](env E) RestoreOption
type UnsupportedIncludePrevArgsError ¶
type UnsupportedIncludePrevArgsError struct {
// contains filtered or unexported fields
}
func (*UnsupportedIncludePrevArgsError) Error ¶
func (err *UnsupportedIncludePrevArgsError) Error() string
Click to show internal directories.
Click to hide internal directories.