Documentation ¶
Index ¶
- Variables
- func Chown(filePath string) error
- func Run(args ...string) error
- func RunDirPath(dirPath string, args ...string) error
- func RunIO(ioObj IO, args ...string) error
- func RunIODirPath(ioObj IO, dirPath string, args ...string) error
- func RunOutput(args ...string) ([]byte, error)
- func RunOutputDirPath(dirPath string, args ...string) ([]byte, error)
- func RunStderr(stderr io.Writer, args ...string) error
- func RunStdin(stdin io.Reader, args ...string) error
- func RunStdout(stdout io.Writer, args ...string) error
- func SetDebug(debug bool)
- type IO
- type RunningCommand
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func Chown ¶
Chown changes the filepath to be owned by the current user and group. It uses 'sudo chown' and 'sudo chgrp'.
TODO(pedge): how to escalate privileges from go?
func RunDirPath ¶
RunDirPath runs the command with the given arguments in the given directory specified by dirPath.
func RunIO ¶
RunIO runs the command with the given IO and arguments.
func RunIODirPath ¶
RunIODirPath runs the command with the given IO and arguments in the given directory specified by dirPath.
func RunOutput ¶
RunOutput runs the command with the given arguments and returns the output of stdout.
func RunOutputDirPath ¶
RunOutputDirPath runs the command with the given arguments in the given directory and returns the output of stdout.
func RunStderr ¶
RunStderr runs the command with the given stderr and arguments.
func RunStdin ¶
RunStdin runs the command with the given stdin and arguments.
func RunStdout ¶
RunStdout runs the command with the given stdout and arguments.
Types ¶
type IO ¶
IO defines the inputs and outputs for a command.
type RunningCommand ¶
type RunningCommand struct {
Args string `protobuf:"bytes,1,opt,name=args" json:"args,omitempty"`
}
func (*RunningCommand) Descriptor ¶
func (*RunningCommand) Descriptor() ([]byte, []int)
func (*RunningCommand) ProtoMessage ¶
func (*RunningCommand) ProtoMessage()
func (*RunningCommand) Reset ¶
func (m *RunningCommand) Reset()
func (*RunningCommand) String ¶
func (m *RunningCommand) String() string