aboutsummaryrefslogtreecommitdiff
path: root/worker.go
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2025-07-31 00:27:20 +0700
committerShulhan <ms@kilabit.info>2025-07-31 00:27:20 +0700
commitb6fec02b55a4227b6ecb47c2bc40a5a025af2b8a (patch)
tree36956ce1c9c51027f6af3982c3c6add0cc596f80 /worker.go
parent0537c5e094c7b6e5ff376ccdf0dba80adf5c4342 (diff)
downloadlilin-b6fec02b55a4227b6ecb47c2bc40a5a025af2b8a.tar.xz
all: refactoring web page to render using template
Instead of using HTML and JavaScript, generate the web page using template. This minimize number of works we do in the future (creating client in JavaScript and HTTP APIs).
Diffstat (limited to 'worker.go')
-rw-r--r--worker.go13
1 files changed, 0 insertions, 13 deletions
diff --git a/worker.go b/worker.go
index d86852d..f58363c 100644
--- a/worker.go
+++ b/worker.go
@@ -4,10 +4,8 @@
package lilin
import (
- "maps"
"os"
"path/filepath"
- "slices"
"strings"
"sync"
@@ -85,14 +83,3 @@ func (wrk *worker) loadServiceDir(configDir string) (err error) {
}
return nil
}
-
-// summary return all services status ordered by name.
-func (wrk *worker) summary() (list []Service) {
- wrk.Lock()
- var keys = slices.Sorted(maps.Keys(wrk.Services))
- for _, name := range keys {
- list = append(list, *wrk.Services[name])
- }
- wrk.Unlock()
- return list
-}