shell

package
v0.2.6 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Exec

func Exec(opt ExecOptions) error

func Output

func Output(opt ExecOptions) (string, error)

func StdLogger

func StdLogger() func(format string, v ...interface{})

Types

type BufferedLogger

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

func NewBufferedLogger

func NewBufferedLogger() *BufferedLogger

func (*BufferedLogger) Lines

func (b *BufferedLogger) Lines() []string

func (*BufferedLogger) Logger

func (b *BufferedLogger) Logger() func(format string, v ...interface{})

type ExecOptions

type ExecOptions struct {
	Args           []string
	Env            []string
	WorkDir        string
	SucessStatuses []int
	Logger         func(format string, v ...interface{})
	ErrorsMap      map[string]error
	ShowShellCmd   bool
	ShowExitCode   bool
}

Jump to

Keyboard shortcuts

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