Documentation
¶
Index ¶
- func AddTasks(contents []byte, context *Context, tasks map[string]Task) map[string]Task
- func CLI(args []string) (string, []string)
- func Log(filename string, context *Context)
- func MagicTaskURL(task string) string
- func NewTask(task string, context *Context, loadedTasks map[string]Task)
- func TaskParser(task, defaultTask string) (string, string)
- type Component
- type Context
- type HTTPTask
- type Task
- type TaskGroup
- type TextConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MagicTaskURL ¶
MagicTaskURL will parse "magic" tasks, as denoted by "__"
func TaskParser ¶
TaskParser returns a url and a task(default if necessary) (location, task)
Types ¶
type Context ¶
type Context struct { TaskName string Stdin string Started time.Time Log map[string]*os.File Args []string AllArgs string Register map[string]string Ok bool Skip string Text TextConfig Silent bool Status string Component string Vars map[string]string Lock *sync.Mutex Out io.Writer Debug bool FileName string Interactive bool // contains filtered or unexported fields }
Context contains the state of a task
func InitialContext ¶
InitialContext will return an empty context
type HTTPTask ¶
type HTTPTask struct {
// contains filtered or unexported fields
}
HTTPTask contains all of our task information
type Task ¶
type Task struct { Aliases string Summary string Usage string Args []string Setup string Defaults []string Dir string For struct { Tasks string MultiTask string Args string } SlackSlashCommands struct { // contains filtered or unexported fields } `yaml:"slack.slash.commands"` HTTPTasks struct { Port string Password string } `yaml:"http.tasks"` Config string Log string Every string Command string Retry int Register map[string]string Env map[string]string Commands string Serve string Script string Stdin string Prompt map[string]string Tasks string MultiTask string Ok string Fail string Wait string Watch string Private bool ExitCode int `yaml:"exit"` Skip bool Interactive bool Plugin map[string]string Check string Include string }
Task holds all of our task components
func FetchTask ¶
func FetchTask(task string, context *Context, tasks map[string]Task) (string, Task, map[string]Task)
FetchTask will fetch the tasks
func (*Task) ParseTaskGroup ¶
ParseTaskGroup takes in a string, and parses it into a TaskGroup
type TextConfig ¶
type TextConfig struct { DisableFormatting bool Success string SuccessIcon string Failure string FailureIcon string Task string Warning string Args string Command string Reset string // color codes Grey string Orange string Green string }
TextConfig contains configuration needed to display text
Source Files
¶
- catalog.go
- check.go
- cli.go
- command.go
- commands.go
- component.go
- config.go
- context.go
- defaults.go
- dir.go
- env.go
- every.go
- fail.go
- fetchTasks.go
- for.go
- http.task.go
- include.go
- list.go
- log.go
- multitask.go
- ok.go
- output.go
- plugin.go
- prompt.go
- register.go
- serve.go
- setup.go
- stdin.go
- summary.go
- task.go
- taskgroup.go
- taskparser.go
- tasks.go
- translate.go
- utils.go
- wait.go
- watch.go
Click to show internal directories.
Click to hide internal directories.