shell

package
v0.0.0-...-2ee2b55 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package shell is a utility for running local shell commands

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetLines

func GetLines(multiline string) []string

GetLines will parse a multiline string and return each line as an item in a slice

Types

type ExecOptions

type ExecOptions struct {
	Silent     bool
	TrimOutput bool
}

ExecOptions are options for running shell.Exec

type Interface

type Interface interface {
	Exec(command string, options ExecOptions) (string, error)
}

Interface is the interface for the shell object

type Shell

type Shell struct{}

Shell is a local command execution utility

func (*Shell) Exec

func (sh *Shell) Exec(command string, options ExecOptions) (string, error)

Exec runs a local shell command

Jump to

Keyboard shortcuts

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