cmdRunner

package
v1.0.23 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrCannotFindDevice = errors.New(`Cannot find device "wg0"`)
View Source
var ErrIpAlreadySet = errors.New("RTNETLINK answers: File exists")
View Source
var ErrOperationNotPermitted = errors.New(`Operation not permitted`)

Functions

func Run

func Run(cmd *ExecCmd) ([]byte, error)

Types

type ExecCmd added in v1.0.17

type ExecCmd struct {
	*exec.Cmd
	// contains filtered or unexported fields
}

func CommandContext added in v1.0.17

func CommandContext(ctx context.Context, cmd string, args ...string) *ExecCmd

func (*ExecCmd) SetAfter added in v1.0.17

func (e *ExecCmd) SetAfter(f Func) *ExecCmd

func (*ExecCmd) SetBefore added in v1.0.17

func (e *ExecCmd) SetBefore(f Func) *ExecCmd

type Func added in v1.0.17

type Func func(ctx context.Context) error

Jump to

Keyboard shortcuts

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