sh

package
v0.0.0-...-70b9ccc Latest Latest
Warning

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

Go to latest
Published: May 28, 2019 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// init
	ErrDirIsFile = errors.New("The necessary ghost system directory is a file")

	// vm
	ErrUnknowExpr = errors.New("Unknow Expr")
)

errors

View Source
var (
	RootDir      string
	RootDirLog   string
	RootDirCache string
	RootDirTmp   string // Default Work Dir
)

Data Dir

Functions

func DirMustExist

func DirMustExist(dir string)

DirMustExist will exit when can't fix the dir

func Exec

func Exec(cmd *exec.Cmd, showCmd bool) error

Exec command

Types

type Shell

type Shell struct {
	Name    string
	Content string
}

Shell for ghost

type VM

type VM struct {
	// config
	WD string
	// contains filtered or unexported fields
}

VM for ghost-shell

func LoadShell

func LoadShell(s Shell) (*VM, error)

LoadShell call parser

func (*VM) Run

func (v *VM) Run(args ...string) (code int)

Run shell

type Val

type Val struct {
	// contains filtered or unexported fields
}

Val for shell

func (*Val) Int

func (v *Val) Int() int

Int value

func (*Val) String

func (v *Val) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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