Documentation ¶
Index ¶
- Variables
- func Ask(question string, possibleValue ...string)
- func Error(err error)
- func ExecuteTemplate(templateFile string, variables map[string]string) ([]byte, error)
- func ExpandEnv(s string) string
- func ExpectAnswer(expected string) (bool, error)
- func Fatal(err error)
- func GlobFiles(includePatterns, excludePatterns []string) ([]string, error)
- func Info(msg string, args ...interface{})
- func Info2(msg string, args ...interface{})
- func MergeMaps(maps ...map[string]string) map[string]string
- func NilArrayToEmpty(a []string) []string
- func PrependPaths(prefix string, paths []string) []string
- func StringArrayMap(a []string, f func(string) string) []string
- func Success(msg string, args ...interface{})
- func TestEnable() bool
- func Warn(msg string, args ...interface{})
- type Command
- func (cmd *Command) CombineOutput() *Command
- func (cmd *Command) RedirectToStandard()
- func (cmd *Command) Run() (*CommandStatus, error)
- func (cmd *Command) SetStderr(w io.Writer)
- func (cmd *Command) SetStdin(content []byte)
- func (cmd *Command) SetStdinReader(r io.Reader)
- func (cmd *Command) SetStdout(w io.Writer)
- func (cmd *Command) SilenceOutput()
- type CommandStatus
- type StringSet
Constants ¶
This section is empty.
Variables ¶
View Source
var Version = "1.0.4"
Version of rivendell
Functions ¶
func ExecuteTemplate ¶
ExecuteTemplate .
func NilArrayToEmpty ¶
NilArrayToEmpty converts a nil array to empty array if possible
func PrependPaths ¶
PrependPaths prepends a prefix to an array of paths
func StringArrayMap ¶
StringArrayMap .
Types ¶
type Command ¶
type Command struct {
// contains filtered or unexported fields
}
Command only Unix is supported
func (*Command) CombineOutput ¶
CombineOutput to command stdout buffer
func (*Command) RedirectToStandard ¶
func (cmd *Command) RedirectToStandard()
RedirectToStandard os.Stdout and os.Stderr
func (*Command) Run ¶
func (cmd *Command) Run() (*CommandStatus, error)
Run the command. If the command exit non-zero, the returned error is still nil.
type CommandStatus ¶
type CommandStatus struct { ExitCode int Stdout io.Reader Stderr io.Reader ElaspedTime time.Duration }
CommandStatus .
func ExecuteCommand ¶
func ExecuteCommand(command string, args ...string) (*CommandStatus, error)
ExecuteCommand and redirect output to standard output/standard error
func ExecuteCommandSilently ¶
func ExecuteCommandSilently(command string, args ...string) (*CommandStatus, error)
ExecuteCommandSilently .
Click to show internal directories.
Click to hide internal directories.