mirror of
https://github.com/yusing/godoxy.git
synced 2026-03-28 11:51:53 +01:00
small refactor and update next-release readme
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
package task
|
||||
|
||||
import "strings"
|
||||
import (
|
||||
"slices"
|
||||
"strings"
|
||||
)
|
||||
|
||||
// debug only.
|
||||
func (t *Task) listChildren() []string {
|
||||
@@ -24,3 +27,17 @@ func (t *Task) listCallbacks() []string {
|
||||
}
|
||||
return callbacks
|
||||
}
|
||||
|
||||
// DebugTaskList returns list of all tasks.
|
||||
//
|
||||
// The returned string is suitable for printing to the console.
|
||||
func DebugTaskList() []string {
|
||||
l := make([]string, 0, allTasks.Size())
|
||||
|
||||
allTasks.RangeAll(func(t *Task) {
|
||||
l = append(l, t.name)
|
||||
})
|
||||
|
||||
slices.Sort(l)
|
||||
return l
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user