批量更新 Agent

This commit is contained in:
naiba
2021-11-04 12:06:20 +08:00
parent f0e0867a3d
commit 58d17b69a1
9 changed files with 124 additions and 17 deletions

View File

@@ -4,6 +4,7 @@ import (
"fmt"
"html/template"
"net/http"
"strconv"
"strings"
"sync"
"time"
@@ -28,6 +29,9 @@ func ServeWeb(port uint) *http.Server {
"tf": func(t time.Time) string {
return t.Format("2006年1月2号 15:04:05")
},
"len": func(slice []interface{}) string {
return strconv.Itoa(len(slice))
},
"safe": func(s string) template.HTML {
return template.HTML(s) // #nosec
},