command

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package command is a simple bare-bones wrapper around the std "os/exec" package. The main feature is that the Exec function captures stderr output in the returned error value.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Interface

type Interface interface {
	Dir(string) Interface // Changes the current working directory.
	Exec() error          // Executes the command and returns an error if any.
}

Interface uses a builder-like pattern to run programs via the terminal.

func New

func New(cmd string) Interface

New returns a new command runner using cmd as the command to run.

Jump to

Keyboard shortcuts

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