small refactor and update next-release readme

This commit is contained in:
yusing
2025-01-02 12:20:21 +08:00
parent a587ada170
commit 9f71fc2dd5
4 changed files with 152 additions and 105 deletions

View File

@@ -4,7 +4,6 @@ import (
"context"
"encoding/json"
"errors"
"slices"
"time"
"github.com/yusing/go-proxy/internal/logging"
@@ -73,17 +72,3 @@ func GracefulShutdown(timeout time.Duration) (err error) {
}
}
}
// 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
}