shell

package
v0.0.0-...-dc0005c Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2016 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Default = "bash"

Default Inteface to use if none provided.

Functions

func Command

func Command(method, line string) (*exec.Cmd, error)

Command returns a *Cmd. If method is empty then the default shell interface method is used. The line should contain the exec line.

func Has

func Has(method string) bool

Has returns if the method name exists or not.

Types

type Bash

type Bash struct{}

Bash shell command.

func (*Bash) Command

func (b *Bash) Command(line string) (*exec.Cmd, error)

func (*Bash) Name

func (b *Bash) Name() string

type Exec

type Exec struct{}

No shell, just execute the command raw.

func (*Exec) Command

func (r *Exec) Command(line string) (*exec.Cmd, error)

func (*Exec) Name

func (r *Exec) Name() string

type Interface

type Interface interface {
	// Name of the shell interface.
	Name() string

	// Put in a exec command line and get a Cmd.
	Command(line string) (*exec.Cmd, error)
}

Interface to the shell.

Jump to

Keyboard shortcuts

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