From d047c36dd09b6169bf27c244196e99bb5df54c3a Mon Sep 17 00:00:00 2001 From: Mitchell Date: Sat, 20 Mar 2021 01:37:03 -0400 Subject: Update documentation. Remove all traces of chdir from the steam library. Remove most linter complaints. --- cmd/web/main.go | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'cmd/web/main.go') diff --git a/cmd/web/main.go b/cmd/web/main.go index da0bebd..7475478 100644 --- a/cmd/web/main.go +++ b/cmd/web/main.go @@ -14,9 +14,12 @@ import ( ) var ( + // Version is overridden by the build script Version = "Development" - Logger = log.New(os.Stderr, "", log.LstdFlags) - Listen = ":8899" + // Logger default logging to stderr + Logger = log.New(os.Stderr, "", log.LstdFlags) + // Listen address for the webserver + Listen = ":8899" //go:embed static/* embeddedStatic embed.FS @@ -48,7 +51,7 @@ func main() { r.Handle("/setLib", UnauthorizedIfNotLocal(http.HandlerFunc(a.HandleSetLib))) r.Handle("/delete", UnauthorizedIfNotLocal(http.HandlerFunc(a.HandleDelete))) r.Handle("/install", UnauthorizedIfNotLocal(http.HandlerFunc(a.HandleInstall))) - r.HandleFunc("/steam-export-web.exe", serveSelf) + r.HandleFunc("/steam-export-web.exe", ServeSelf) r.HandleFunc("/download/{game}", a.HandleDownload) r.Handle("/status", UnauthorizedIfNotLocal(http.HandlerFunc(a.HandleStats))) r.PathPrefix("/static").Handler( @@ -72,7 +75,7 @@ func main() { if err != nil { panic(err) } - port += 1 + port++ Listen = fmt.Sprintf("%s:%d", parts[0], port) -- cgit v1.2.3