Move main package to cmd/task

This commit is contained in:
Andrey Nering
2017-02-27 09:48:50 -03:00
parent 6104b42368
commit a441fea849
3 changed files with 12 additions and 3 deletions
+1 -1
View File
@@ -13,4 +13,4 @@
# Project-local glide cache, RE: https://github.com/Masterminds/glide/issues/736
.glide/
task
./task
+9
View File
@@ -0,0 +1,9 @@
package main
import (
"github.com/go-task/task"
)
func main() {
task.Run()
}
+2 -2
View File
@@ -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:]