Documentation ¶
Index ¶
- func Command(cmd string, args ...string) (c *exec.Cmd, stdout *bytes.Buffer, stderr *bytes.Buffer)
- func CommandCombinedOut(cmd string, args ...string) (*exec.Cmd, *bytes.Buffer)
- func CommandStart(cmd string, args ...string) (*exec.Cmd, error)
- func CreateFile(shellScript string) (filename string, err error)
- func Run(shellScript string, args ...string) (response string, err error)
- func RunExec(cmd string, args ...string) ([]byte, error)
- func RunExecBackground(cmd string, args ...string) ([]byte, error)
- func RunFile(filename string, args ...string) (string, error)
- func RunOutput(cmd string, args ...string) (string, error)
- type ShellCmd
- func NewShellCmd(command string, args ...string) (instance *ShellCmd)
- func RunBackground(shellScript string, args ...string) (c *ShellCmd, err error)
- func RunFileBackground(filename string, args ...string) (c *ShellCmd, err error)
- func StartExecBackground(cmd string, args ...string) (c *ShellCmd, err error)
- func (instance *ShellCmd) GetArgs() []string
- func (instance *ShellCmd) GetCommand() string
- func (instance *ShellCmd) IsBackground() bool
- func (instance *ShellCmd) IsRunning() bool
- func (instance *ShellCmd) Kill() error
- func (instance *ShellCmd) OnErr(callback func(event *gg_events.Event))
- func (instance *ShellCmd) OnOut(callback func(event *gg_events.Event))
- func (instance *ShellCmd) OutWasInactiveFor(d time.Duration) bool
- func (instance *ShellCmd) Pid() int
- func (instance *ShellCmd) Run() (err error)
- func (instance *ShellCmd) SetArgs(values ...string) *ShellCmd
- func (instance *ShellCmd) SetBackground(value bool) *ShellCmd
- func (instance *ShellCmd) SetCommand(value string) *ShellCmd
- func (instance *ShellCmd) SetLogger(value gg_log.ILogger) *ShellCmd
- func (instance *ShellCmd) StdErr() string
- func (instance *ShellCmd) StdOut() string
- func (instance *ShellCmd) Wait() (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CommandCombinedOut ¶
func CreateFile ¶
CreateFile creates an executable shell file
func RunExecBackground ¶
RunExecBackground start command in background a
Types ¶
type ShellCmd ¶
type ShellCmd struct {
// contains filtered or unexported fields
}
ShellCmd wrap a command
func NewShellCmd ¶
func RunBackground ¶
func RunFileBackground ¶
func StartExecBackground ¶
func (*ShellCmd) GetCommand ¶
func (*ShellCmd) IsBackground ¶
func (*ShellCmd) OutWasInactiveFor ¶
func (*ShellCmd) SetBackground ¶
func (*ShellCmd) SetCommand ¶
Click to show internal directories.
Click to hide internal directories.