Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Command ¶
type Command struct {
// Args contains the arguments to the function.
Args []string `mapstructure:"scripter.args"`
// Package the function exists in.
Package string `mapstructure:"scripter.package"`
// Function (or method) to call.
Function string `mapstructure:"scripter.function"`
// GlobalVar, if not empty, indicates a global variable to call, and means
// Function is a method on that variable.
GlobalVar string `mapstructure:"scripter.globalvar"`
// Regen, if true, indicates we should create a new script file even if the
// old one exists.
Regen bool `mapstructure:"scripter.regen"`
// Cache, if non-empty, indicates the user has specified the non-default
// location for their gorram scripts to be located.
Cache string `mapstructure:"scripter.cache"`
// Template, if non-empty, contains the Go template with which to format the
// output.
Template string `mapstructure:"scripter.template"`
// Env contains the input and output streams the command should read from
// and write to.
Env Env `mapstructure:",squash"`
// contains filtered or unexported fields
}
Command contains the definition of a command that gorram can execute. It represents a package and either global function or a method call on a global variable. If GlobalVar is non-empty, it's the latter.
Click to show internal directories.
Click to hide internal directories.