diff --git a/.gitignore b/.gitignore index 95945e38..80313f43 100644 --- a/.gitignore +++ b/.gitignore @@ -13,4 +13,4 @@ # Project-local glide cache, RE: https://github.com/Masterminds/glide/issues/736 .glide/ -task +./task diff --git a/cmd/task/task.go b/cmd/task/task.go new file mode 100644 index 00000000..8f4cb493 --- /dev/null +++ b/cmd/task/task.go @@ -0,0 +1,9 @@ +package main + +import ( + "github.com/go-task/task" +) + +func main() { + task.Run() +} diff --git a/task.go b/task.go index 9033ce8b..1712d76f 100644 --- a/task.go +++ b/task.go @@ -1,4 +1,4 @@ -package main +package task import ( "fmt" @@ -43,7 +43,7 @@ func (err *TaskRunError) Error() string { return fmt.Sprintf(`Failed to run task "%s": %v`, err.taskName, err.err) } -func main() { +func Run() { log.SetFlags(0) args := os.Args[1:]