1
0
mirror of https://github.com/go-task/task.git synced 2024-12-04 10:24:45 +02:00

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

2
.gitignore vendored
View File

@ -13,4 +13,4 @@
# Project-local glide cache, RE: https://github.com/Masterminds/glide/issues/736
.glide/
task
./task

9
cmd/task/task.go Normal file
View File

@ -0,0 +1,9 @@
package main
import (
"github.com/go-task/task"
)
func main() {
task.Run()
}

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:]