mirror of
https://github.com/go-task/task.git
synced 2025-06-04 23:38:05 +02:00
Move main package to cmd/task
This commit is contained in:
parent
6104b42368
commit
a441fea849
2
.gitignore
vendored
2
.gitignore
vendored
@ -13,4 +13,4 @@
|
|||||||
# Project-local glide cache, RE: https://github.com/Masterminds/glide/issues/736
|
# Project-local glide cache, RE: https://github.com/Masterminds/glide/issues/736
|
||||||
.glide/
|
.glide/
|
||||||
|
|
||||||
task
|
./task
|
||||||
|
9
cmd/task/task.go
Normal file
9
cmd/task/task.go
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/go-task/task"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
task.Run()
|
||||||
|
}
|
4
task.go
4
task.go
@ -1,4 +1,4 @@
|
|||||||
package main
|
package task
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
@ -43,7 +43,7 @@ func (err *TaskRunError) Error() string {
|
|||||||
return fmt.Sprintf(`Failed to run task "%s": %v`, err.taskName, err.err)
|
return fmt.Sprintf(`Failed to run task "%s": %v`, err.taskName, err.err)
|
||||||
}
|
}
|
||||||
|
|
||||||
func main() {
|
func Run() {
|
||||||
log.SetFlags(0)
|
log.SetFlags(0)
|
||||||
|
|
||||||
args := os.Args[1:]
|
args := os.Args[1:]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user