Versions in this module Expand all Collapse all v1 v1.0.1 Jan 7, 2023 Changes in this version + var ColorSet = struct{ ... } + var ProjectName string + var ProjectPkg string + var ProjectVersion string + var TypicalTmp string + func BuildTool(d *Descriptor) *cli.App + func CliFunc(d *Descriptor, a Action) func(*cli.Context) error + func GoImports(c *Context, target string) error + func InstallTool(c *Context, name, source string) (string, error) + func Start(d *Descriptor) + type Action interface + Execute func(*Context) error + type Actions []Action + func (a Actions) Execute(c *Context) error + type BuildVars map[string]string + func (b BuildVars) Keys() []string + func (b BuildVars) String() string + type Command struct + Args []string + Dir string + Env []string + Name string + Stderr io.Writer + Stdin io.Reader + Stdout io.Writer + func CommandLine(line string) *Command + func (b *Command) Command(extras ...string) *Command + func (b *Command) ExecCmd(ctx context.Context) *exec.Cmd + func (b *Command) Execute(c *Context) error + func (b Command) String() string + type Commander interface + Command func(extras ...string) *Command + type Context struct + Descriptor *Descriptor + func NewContext(c *cli.Context, d *Descriptor) *Context + func (c *Context) Ctx() context.Context + func (c *Context) ExecuteCommand(basher Commander) error + func (c *Context) ExecuteCommandLine(commandLine string) error + func (c *Context) PatchBash(mocks []*MockCommand) func(t *testing.T) + type Descriptor struct + Environment EnvLoader + ProjectName string + ProjectVersion string + Stdout io.Writer + Tasks []Tasker + type DotEnv string + func (d DotEnv) EnvLoad() (map[string]string, error) + type EnvLoader interface + EnvLoad func() (map[string]string, error) + type Environment map[string]string + func (e Environment) EnvLoad() (map[string]string, error) + type GoBuild struct + Ldflags fmt.Stringer + MainPackage string + Output string + func (p *GoBuild) Command(extras ...string) *Command + func (p *GoBuild) Execute(c *Context) error + func (p *GoBuild) Task() *Task + type GoTest struct + Excludes []string + Includes []string + NoCover bool + Timeout time.Duration + Verbose bool + func (t *GoTest) Execute(c *Context) error + func (t *GoTest) Task() *Task + type LogHeader struct + Color color.Attribute + Text string + func LogHeaders(taskNames ...string) []LogHeader + type Logger struct + Headers []LogHeader + Stdout io.Writer + func (c Logger) Command(bash *Command) + func (c Logger) Info(a ...interface{}) + func (c Logger) Infof(format string, a ...interface{}) + func (c Logger) Warn(a ...interface{}) + func (c Logger) Warnf(format string, a ...interface{}) + type MockCommand struct + CommandLine string + ErrorBytes []byte + OutputBytes []byte + ReturnError error + type MockCommandRunner struct + Mocks []*MockCommand + Ptr int + func (r *MockCommandRunner) Close() error + func (r *MockCommandRunner) Expectation() *MockCommand + func (r *MockCommandRunner) Run(bash *Command) error + type NewAction func(*Context) error + func (a NewAction) Execute(c *Context) error + type RunBinary struct + Before Action + Binary string + func (r *RunBinary) Execute(c *Context) error + func (r *RunBinary) Task() *Task + type Task struct + Action Action + Aliases []string + Before Action + Flags []cli.Flag + Name string + SkipFlagParsing bool + SubTasks []*Task + Usage string + func (t *Task) CliCommand(d *Descriptor) *cli.Command + func (t *Task) Task() *Task + type TaskNames []string + func (r TaskNames) Execute(c *Context) error + type Tasker interface + Task func() *Task