Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Basher ¶
type Basher struct {
// The io.Reader given to Bash for STDIN
Stdin io.Reader
// The io.Writer given to Bash for STDOUT
Stdout io.Writer
// The io.Writer given to Bash for STDERR
Stderr io.Writer
Bindata Bindata
// contains filtered or unexported fields
}
Basher is a context for running bash scripts
func NewBasher ¶
NewBasher returns a new basher context
- bindata contains all the assets
- scriptContent is the all in one script content
The scripts will be placed in library/name, e.g. ~/.caimake/make-rules
func (*Basher) Run ¶
Run a command in Bash from this Basher. Standard I/O by default is attached to the calling process I/O. You can change this by setting the Stdout, Stderr, Stdin variables of the Basher.
type Bindata ¶
type Bindata interface {
// Asset loads and returns the asset for the given name.
// It returns an error if the asset could not be found or
// could not be loaded.
Asset(name string) ([]byte, error)
// MustAsset is like Asset but panics when Asset would return an error.
// It simplifies safe initialization of global variables.
MustAsset(name string) []byte
// AssetInfo loads and returns the asset info for the given name.
// It returns an error if the asset could not be found or
// could not be loaded.
AssetInfo(name string) (os.FileInfo, error)
// AssetNames returns the names of the assets.
AssetNames() []string
// AssetDir returns the file names below a certain
// directory embedded in the file by go-bindata.
// For example if you run go-bindata on data/... and data contains the
// following hierarchy:
// data/
// foo.txt
// img/
// a.png
// b.png
// then AssetDir("data") would return []string{"foo.txt", "img"}
// AssetDir("data/img") would return []string{"a.png", "b.png"}
// AssetDir("foo.txt") and AssetDir("notexist") would return an error
// AssetDir("") will return []string{"data"}.
AssetDir(name string) ([]string, error)
// RestoreAsset restores an asset under the given directory
RestoreAsset(dir, name string) error
// RestoreAssets restores an asset under the given directory recursively
RestoreAssets(dir, name string) error
}
Bindata ...
func NewBindata ¶
func NewBindata( asset func(name string) ([]byte, error), mustAsset func(name string) []byte, assetInfo func(name string) (os.FileInfo, error), assetNames func() []string, assetDir func(name string) ([]string, error), restoreAsset func(dir, name string) error, restoreAssets func(dir, name string) error, ) Bindata
NewBindata ...
Click to show internal directories.
Click to hide internal directories.