Documentation ¶
Index ¶
- Variables
- func Add(name string, grift Grift) error
- func Desc(name string, description string) error
- func Exec(args []string, verbose bool) error
- func List() []string
- func Namespace(name string, s func()) error
- func PrintGrifts(w io.Writer)
- func Remove(name string) error
- func Rename(oldName string, newName string) error
- func Run(name string, c *Context) error
- func RunSource(cmd *exec.Cmd) error
- func Set(name string, grift Grift) error
- type Context
- type Grift
Constants ¶
This section is empty.
Variables ¶
var CommandName = "grift"
Functions ¶
func Add ¶
Add a grift. If there is already a grift with the given name the two grifts will be bundled together.
func Desc ¶
Desc sets a helpful descriptive text for a grift. This description will be shown when `grift list` is run.
func PrintGrifts ¶
PrintGrifts to the screen, nice, sorted, and with descriptions, should they exist.
func Rename ¶
Rename a grift. Useful if you want to re-define an existing grift, but don't want to write over the original.
func Run ¶
Run a grift. This allows for the chaining for grifts. One grift can Run another grift and so on.
Types ¶
type Context ¶
type Context struct { context.Context Name string Args []string Verbose bool // contains filtered or unexported fields }
Context used to pass information between grifts
func NewContext ¶
NewContext builds and returns a new default Context.
func NewContextWithContext ¶
NewContextWithContext builds and returns a new default Context given an existing context