shell

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: May 18, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunCommand

func RunCommand(command string, args ...string) error

RunCommand runs command with given arguments

Types

type Shell

type Shell struct {
	Stdin   io.Reader
	Stdout  io.Writer
	Stderr  io.Writer
	Env     map[string]string
	Command string
	Args    []string
	Dir     string
}

Shell represents shell command

func New

func New(command string, args ...string) Shell

New returns Shell instance

func (Shell) Run

func (s Shell) Run(ctx context.Context) error

Run runs shell command based on given command and args

Jump to

Keyboard shortcuts

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