shell

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2023 License: MIT Imports: 3 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cmd

type Cmd struct {
	// contains filtered or unexported fields
}

Cmd represents a shell command

func NewCmd

func NewCmd(cmd string) *Cmd

NewCmd shell command from a string

func NewCmdf

func NewCmdf(cmdf string, args ...interface{}) *Cmd

NewCmdf creates a shell command from a format string

func (*Cmd) Output

func (c *Cmd) Output() (string, error)

Output runs the command and returns text from stdout

func (*Cmd) Run

func (c *Cmd) Run() error

Run runs shell command

func (*Cmd) RunWith

func (c *Cmd) RunWith(env map[string]string) error

RunWith runs shell command with environment variables

Jump to

Keyboard shortcuts

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