Documentation ¶
Overview ¶
Package cast provides utility funcs for magefiles.
Index ¶
- func DirPrepSh(prefix string) func(dir, suffix string, a ...interface{}) error
- func DirSh(dir, format string, a ...interface{}) error
- func PrepShOutput(prefix string) func(suffix string, a ...interface{}) (string, error)
- func Sh(format string, a ...interface{}) error
- func ShOutput(format string, a ...interface{}) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DirPrepSh ¶
DirPrepSh prepares an Sh invocation with the provided prefix. when the returned func is executed, prefix and suffix are joined with a space, then passed in to Sh along with any values for a.
This version allows giving a directory to execute in. If you only wish to pass values for a, use "" for suffix.
func DirSh ¶
DirSh formats the provided string and arguments, tokenizes the result using shell style rules, and then executes the result in a way similar to mage's sh.RunWith under the provided working directory.
func PrepShOutput ¶
PrepShOutput prepares an ShOut invocation with the provided prefix. when the returned func is executed, prefix and suffix are joined with a space, then passed in to Sh along with any values for a.
If you only wish to pass values for a, use "" for suffix.
Types ¶
This section is empty.