mirror of
https://github.com/yusing/godoxy.git
synced 2025-05-20 20:52:33 +02:00
26 lines
503 B
Go
26 lines
503 B
Go
package task
|
|
|
|
import "strings"
|
|
|
|
// debug only.
|
|
func (t *Task) listChildren() []string {
|
|
var children []string
|
|
allTasks.Range(func(child *Task) bool {
|
|
if child.parent == t {
|
|
children = append(children, strings.TrimPrefix(child.name, t.name+"."))
|
|
}
|
|
return true
|
|
})
|
|
return children
|
|
}
|
|
|
|
// debug only.
|
|
func (t *Task) listCallbacks() []string {
|
|
var callbacks []string
|
|
t.mu.Lock()
|
|
defer t.mu.Unlock()
|
|
for c := range t.callbacks {
|
|
callbacks = append(callbacks, c.about)
|
|
}
|
|
return callbacks
|
|
}
|