shell

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 13, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultShell = "/bin/sh"

DefaultShell defines in which shell all commands should be executed by default

Variables

This section is empty.

Functions

This section is empty.

Types

type Command

type Command struct {
	Run   []string `yaml:"run",json:"run"`
	Shell string   `yaml:"shell",json:"shell"`
	Root  bool     `yaml:"root",json:"root"`
}

Command represents command to execute in given shell

type PrintFn

type PrintFn func(string)

PrintFn prints command output

type Shell

type Shell interface {
	Exec(command Command, stopOnError bool) error
}

Shell gives an ability to run shell commands

func New

func New(printCmd PrintFn, printOut PrintFn, printErr PrintFn) Shell

New creates a new instance that implements Shell interface

Directories

Path Synopsis
Code generated by mockery v1.0.0
Code generated by mockery v1.0.0

Jump to

Keyboard shortcuts

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