variabilized app name
All checks were successful
Update Child Repos / update (push) Successful in 7s

This commit is contained in:
2026-01-02 15:14:48 +01:00
parent 75769dcff6
commit 24e45d728d
3 changed files with 5 additions and 1 deletions

View File

@@ -1,4 +1,6 @@
--- ---
app_name: Go Template Container Web Server
listen: listen:
address: 0.0.0.0 address: 0.0.0.0
port: 80 port: 80

View File

@@ -11,6 +11,7 @@ import (
type WebServer struct { type WebServer struct {
HTTPServer *http.Server HTTPServer *http.Server
AppName string `yaml:"app_name"`
Listen WSListen `yaml:"listen"` Listen WSListen `yaml:"listen"`
} }
@@ -25,6 +26,7 @@ func (s *WebServer) Initialize() {
Address: "0.0.0.0", Address: "0.0.0.0",
Port: "80", Port: "80",
} }
s.AppName = "Go Template Container Web Server"
// Attempt to read the config file // Attempt to read the config file
configFile, err := os.ReadFile("config.yml") configFile, err := os.ReadFile("config.yml")

View File

@@ -20,7 +20,7 @@ func handleVersion(w http.ResponseWriter, r *http.Request) {
// Return (write) the version to the response body // Return (write) the version to the response body
tmpl.Execute(w, SiteInfo{ tmpl.Execute(w, SiteInfo{
CommitId: COMMIT_ID, CommitId: COMMIT_ID,
Name: "YASKM", Name: ws.AppName,
Version: APP_VERSION, Version: APP_VERSION,
}) })
} }