Fix: go version
This commit is contained in:
6
go.mod
6
go.mod
@ -1,7 +1,3 @@
|
|||||||
module golias
|
module golias
|
||||||
|
|
||||||
go 1.21
|
go 1.24
|
||||||
|
|
||||||
require (
|
|
||||||
github.com/go-chi/chi/v5 v5.0.12
|
|
||||||
)
|
|
||||||
|
@ -6,11 +6,11 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
var roundWords = map[string]string{
|
var roundWords = map[string]string{
|
||||||
"hamster": "blue",
|
"hamster": "blue",
|
||||||
"child": "red",
|
"child": "red",
|
||||||
"wheel": "white",
|
"wheel": "white",
|
||||||
"condition": "black",
|
"condition": "black",
|
||||||
"test": "white",
|
"test": "white",
|
||||||
}
|
}
|
||||||
|
|
||||||
func HandlePing(w http.ResponseWriter, r *http.Request) {
|
func HandlePing(w http.ResponseWriter, r *http.Request) {
|
||||||
@ -18,6 +18,6 @@ func HandlePing(w http.ResponseWriter, r *http.Request) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func HandleHome(w http.ResponseWriter, r *http.Request) {
|
func HandleHome(w http.ResponseWriter, r *http.Request) {
|
||||||
tmpl := template.Must(template.ParseFiles("../components/index.html"))
|
tmpl := template.Must(template.ParseFiles("components/index.html"))
|
||||||
tmpl.Execute(w, roundWords)
|
tmpl.Execute(w, roundWords)
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user