shellkit

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute(commands ...string) (code int, stdout string, stderr string, err error)

func ExecuteSingleLine added in v1.2.0

func ExecuteSingleLine(cmd string) (code int, stdout string, stderr string, err error)

func NewError added in v1.2.0

func NewError(stderr string, err error) error

Types

type Result

type Result struct {
	Code   int    `json:"code"`
	Stdout string `json:"stdout"`
	Stderr string `json:"stderr"`
	Error  error  `json:"err,omitempty"`
}

type ResultTotal

type ResultTotal struct {
	Results []*Result `json:"results,omitempty"`
}

func ExecuteBatch

func ExecuteBatch(commands []string) (ResultTotal, error)

func (*ResultTotal) Append

func (t *ResultTotal) Append(result Result)

func (*ResultTotal) OK added in v1.2.0

func (t *ResultTotal) OK() bool

Jump to

Keyboard shortcuts

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