From b6148e6f798a21ccd51ad76729d26ef7deb48bb5 Mon Sep 17 00:00:00 2001 From: JianFeeeee Date: Sun, 11 Oct 2026 11:41:08 +0800 Subject: [PATCH] =?UTF-8?q?chore(lua):=20=E5=88=A0=E9=99=A4=E8=B0=83?= =?UTF-8?q?=E5=BA=A6=E5=99=A8=E9=87=8C=E4=B8=A4=E4=B8=AA=E6=97=A0=E4=BA=BA?= =?UTF-8?q?=E8=B0=83=E7=94=A8=E7=9A=84=E8=AF=8A=E6=96=AD=E8=BE=85=E5=8A=A9?= =?UTF-8?q?=E5=87=BD=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sortedTaskNames / PluginTasks 是开发 Phase 4 时留下的诊断辅助,最终 没有任何调用点(WebUI 走 /api/plugins 的既有结构)。连同不再需要的 sort import 一并删除,保持包面干净。 --- internal/lua/plugin_runtime.go | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/internal/lua/plugin_runtime.go b/internal/lua/plugin_runtime.go index 6394144..382fd5e 100644 --- a/internal/lua/plugin_runtime.go +++ b/internal/lua/plugin_runtime.go @@ -33,7 +33,6 @@ package lua import ( "fmt" - "sort" "sync" "sync/atomic" "time" @@ -638,23 +637,3 @@ func readNumberInt(L *golua.State, idx int, field string) int { } return int(L.ToNumber(-1)) } - -// sortedTaskNames returns the task function names of a spec (for diagnostics). -func (s scheduleSpec) sortedTaskNames() []string { - out := make([]string, 0, len(s.tasks)) - for _, t := range s.tasks { - out = append(out, t.Fn) - } - sort.Strings(out) - return out -} - -// PluginTasks lists the scheduled task names a plugin declared (for diagnostics -// and for the WebUI to show what periodic work exists). -func (p *Plugin) PluginTasks() []string { - out := make([]string, 0, len(p.Schedule)) - for _, t := range p.Schedule { - out = append(out, t.Fn) - } - return out -}