shell

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package shell handles interactions with the OS shell

Index

Constants

View Source
const Type = "shell"

Type shell represents a shell command

Variables

This section is empty.

Functions

This section is empty.

Types

type Execute

type Execute struct {
	Command command
}

Execute represents a way to execute shell commands with values piped to them.

func (*Execute) ExecuteWithValue

func (e *Execute) ExecuteWithValue(method *config.Method, value string) (string, error)

ExecuteWithValue executes a shell command with a value piped to it. If it exits with code 0, no error is returned and the stdout is captured and returned. If it exits with code 1, an error is returned and the stderr is captured and returned. If the timeout is reached, an error is returned.

func (*Execute) GetType

func (e *Execute) GetType() string

GetType returns the shell executer type

Jump to

Keyboard shortcuts

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