shell

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const ShellToUse = "bash"

ShellToUse bash shell

Variables

This section is empty.

Functions

This section is empty.

Types

type CommandExec

type CommandExec struct {
}

CommandExec object

func (CommandExec) Exec

func (ce CommandExec) Exec(command string) (*CommandResult, error)

Exec execute shell command #nosec

type CommandResult

type CommandResult struct {
	Stdout string
	Stderr string
}

CommandResult return data

type Executor

type Executor interface {
	Exec(command string) (*CommandResult, error)
}

Executor defines the interface for shell command executor exec.go

func NewShellExec

func NewShellExec() Executor

NewShellExec return new instance of shell executor

Jump to

Keyboard shortcuts

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