remove stupid variable name

Signed-off-by: Odyssey346 <odyssey346@disroot.org>
This commit is contained in:
Odyssey346 2022-07-28 21:37:41 +02:00
parent d24c5eecee
commit 13af65c965

10
main.go
View File

@ -14,18 +14,18 @@ type StaticThingy struct {
Port string
}
var pieceof string
var port string
var shit bool
func main() {
log.Println("[Segfautilities] Starting")
otherthings.CheckEnv()
log.Println("[HTTP] Starting server")
pieceof := os.Getenv("SEGFAUTILITIES_PORT")
port := os.Getenv("SEGFAUTILITIES_PORT")
tmpl := template.Must(template.ParseFiles("static/index.html"))
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
data := StaticThingy{
Port: pieceof,
Port: port,
}
tmpl.Execute(w, data)
})
@ -33,6 +33,6 @@ func main() {
io.WriteString(w, "welcome to hell")
})
api.Form()
log.Println("[HTTP] HTTP server is now running at " + pieceof + "!")
log.Println(http.ListenAndServe(":" + pieceof, nil))
log.Println("[HTTP] HTTP server is now running at " + port + "!")
log.Println(http.ListenAndServe(":" + port, nil))
}