Documentation
¶
Index ¶
- func ExecWithStreamOutput(command string, outputCallback func(string)) error
- func RunDefaultBashC(command string) error
- func RunDefaultBashCf(command string, arg ...interface{}) error
- func RunDefaultWithStdoutBashC(command string) (string, error)
- func RunDefaultWithStdoutBashCf(command string, arg ...interface{}) (string, error)
- func SudoHandleCmd() string
- func Which(name string) bool
- type CommandHelper
- func (c *CommandHelper) Run(name string, arg ...string) error
- func (c *CommandHelper) RunBashC(command string) error
- func (c *CommandHelper) RunBashCWithArgs(arg ...string) error
- func (c *CommandHelper) RunBashCf(command string, arg ...interface{}) error
- func (c *CommandHelper) RunWithStdout(name string, arg ...string) (string, error)
- func (c *CommandHelper) RunWithStdoutBashC(command string) (string, error)
- func (c *CommandHelper) RunWithStdoutBashCf(command string, arg ...interface{}) (string, error)
- type CustomWriter
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExecWithStreamOutput ¶
func RunDefaultBashC ¶
func RunDefaultBashCf ¶
func SudoHandleCmd ¶
func SudoHandleCmd() string
Types ¶
type CommandHelper ¶
type CommandHelper struct { IgnoreExist1 bool // contains filtered or unexported fields }
func NewCommandMgr ¶
func NewCommandMgr(opts ...Option) *CommandHelper
func (*CommandHelper) RunBashC ¶
func (c *CommandHelper) RunBashC(command string) error
func (*CommandHelper) RunBashCWithArgs ¶
func (c *CommandHelper) RunBashCWithArgs(arg ...string) error
func (*CommandHelper) RunBashCf ¶
func (c *CommandHelper) RunBashCf(command string, arg ...interface{}) error
func (*CommandHelper) RunWithStdout ¶
func (c *CommandHelper) RunWithStdout(name string, arg ...string) (string, error)
func (*CommandHelper) RunWithStdoutBashC ¶
func (c *CommandHelper) RunWithStdoutBashC(command string) (string, error)
func (*CommandHelper) RunWithStdoutBashCf ¶
func (c *CommandHelper) RunWithStdoutBashCf(command string, arg ...interface{}) (string, error)
type CustomWriter ¶
type CustomWriter struct {
// contains filtered or unexported fields
}
func (*CustomWriter) Flush ¶
func (cw *CustomWriter) Flush()
type Option ¶
type Option func(*CommandHelper)
func WithIgnoreExist1 ¶
func WithIgnoreExist1() Option
func WithLogger ¶
func WithOutputFile ¶
func WithScriptPath ¶
func WithTimeout ¶
func WithWorkDir ¶
Click to show internal directories.
Click to hide internal directories.