From 0ea68bf2b8946698ede077eb17a0370f2936258f Mon Sep 17 00:00:00 2001 From: handsomezhuzhu <2658601135@qq.com> Date: Tue, 20 Jan 2026 13:48:42 +0800 Subject: [PATCH] v1.1.0 --- main.go | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/main.go b/main.go index ed2de42..b39bc49 100644 --- a/main.go +++ b/main.go @@ -13,6 +13,10 @@ import ( "time" ) +const ( + Version = "1.1.0" +) + var ( proxyMap = make(map[string]*httputil.ReverseProxy) tpl *template.Template @@ -190,7 +194,7 @@ const htmlTemplate = ` @@ -199,7 +203,8 @@ const htmlTemplate = ` ` type PageData struct { - Items []MappingItem + Items []MappingItem + Version string } type MappingItem struct { @@ -360,7 +365,10 @@ func renderHome(w http.ResponseWriter) { return items[i].Path < items[j].Path }) - if err := tpl.Execute(w, PageData{Items: items}); err != nil { + if err := tpl.Execute(w, PageData{ + Items: items, + Version: Version, + }); err != nil { log.Printf("Template execution error: %v", err) } }