diff options
author | Robby Zambito <contact@robbyzambito.me> | 2025-08-07 21:36:24 -0400 |
---|---|---|
committer | Robby Zambito <contact@robbyzambito.me> | 2025-08-08 11:40:59 -0400 |
commit | 0c4d50017842ee2bd07f6a0fcc7c8b28fb3a5345 (patch) | |
tree | c58a10432d356475de3ff2fa25724a6837e788f6 /main.go | |
parent | f0e918354bc27525e49ee4b4794fe44ff605f046 (diff) |
Rename logChan to toLogParser
Better description
Diffstat (limited to 'main.go')
-rw-r--r-- | main.go | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -32,15 +32,15 @@ func main() { n := 0 king := "NOKING" - logChan := make(chan string) + toLogParser := make(chan string) - go parser(logChan, &king) + go parser(toLogParser, &king) - http.HandleFunc("/", api.CreateFilesHandler(&logs, &n, logChan)) + http.HandleFunc("/", api.CreateFilesHandler(&logs, &n, toLogParser)) http.HandleFunc("/logs", api.CreateGetLogs(&logs)) http.HandleFunc("/api/v1/logs", api.CreateGetLogs(&logs)) - http.HandleFunc("/api/v1/auth/login", api.CreateLoginHandler(&logs, &n, logChan)) + http.HandleFunc("/api/v1/auth/login", api.CreateLoginHandler(&logs, &n, toLogParser)) http.HandleFunc("/api/v1/king", func(w http.ResponseWriter, r *http.Request) { fmt.Fprintf(w, king) }) @@ -51,9 +51,9 @@ func main() { http.HandleFunc("/api/v1/status/incidents", api.StatusIncidentsHandler) http.HandleFunc("/api/v1/status/maintenance", api.StatusMaintenanceHandler) http.HandleFunc("/api/v1/status/uptime", api.StatusUptimeHandler) - http.HandleFunc("/api/v1/status/subscribe", api.CreateStatusSubscribeHandler(&logs, &n, logChan)) + http.HandleFunc("/api/v1/status/subscribe", api.CreateStatusSubscribeHandler(&logs, &n, toLogParser)) - http.HandleFunc("/api/v1/contact", api.CreateContactHandler(&logs, &n, logChan)) + http.HandleFunc("/api/v1/contact", api.CreateContactHandler(&logs, &n, toLogParser)) // Start the server on port 8080 fmt.Println("Server is listening on port 8080...") |