command

package
v0.39.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 11, 2017 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExitStatus

func ExitStatus(err error) (int, bool)

ExitStatus will return the exit-code from an error

func GitPath

func GitPath() string

GitPath returns the path to the `git` binary. See `SetGitPath` for details on how this is set

Types

type Command

type Command struct {
	io.Reader
	*exec.Cmd
	// contains filtered or unexported fields
}

Command encapsulates operations with commands creates with NewCommand

func Git

func Git(ctx context.Context, args ...string) (*Command, error)

Git creates a git Command with the given args

func GitlabShell

func GitlabShell(ctx context.Context, envs []string, executable string, args ...string) (*Command, error)

GitlabShell creates a gitlab-shell Command with the given args

func New

func New(ctx context.Context, cmd *exec.Cmd, stdin io.Reader, stdout, stderr io.Writer, env ...string) (*Command, error)

New creates a Command from an exec.Cmd

func (*Command) Close

func (c *Command) Close() error

Close will send a SIGTERM signal to the process group belonging to the `cmd` process

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL