Documentation
¶
Overview ¶
TaskForce, a simple, functional task runner without the plugin nonsense!
package main
import (
"fmt"
"os"
"github.com/cjtoolkit/taskforce"
)
func task() *taskforce.TaskForce {
tf := taskforce.InitTaskForce()
tf.Register("hello", func() {
fmt.Println("Hello,")
})
tf.Register("world", func() {
fmt.Println("World.")
})
tf.Register("echo-world", func() {
tf.ExecCmd("echo", "world")
})
tf.Register("both", func() {
tf.Run("hello", "world")
})
return tf
}
func main() {
task().Run(os.Args[1:]...)
}
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TaskForce ¶
type TaskForce struct {
// contains filtered or unexported fields
}
func (*TaskForce) CheckError ¶
Check Error, will panic if there is an error.
func (*TaskForce) ExecCmd ¶
Execute Terminal Command, will panic if there is error with the command.
Click to show internal directories.
Click to hide internal directories.