add list command to view available tasks
move init to a taks.go for centralization
This commit is contained in:
16
cmd/survey/tasks/tasks.go
Normal file
16
cmd/survey/tasks/tasks.go
Normal file
@@ -0,0 +1,16 @@
|
||||
package tasks
|
||||
|
||||
import (
|
||||
"github.com/LazyBachelor/LazyPM/internal/service"
|
||||
"github.com/LazyBachelor/LazyPM/pkg/task"
|
||||
)
|
||||
|
||||
func init() {
|
||||
task.Register("create_issue", func(svc *service.Services) task.Tasker {
|
||||
return NewCreateIssueTask(svc)
|
||||
})
|
||||
|
||||
task.Register("coding_task", func(svc *service.Services) task.Tasker {
|
||||
return NewCodingTask(svc)
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user