changes in version and woodpecker
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
2025-05-30 00:57:52 +02:00
parent 95d0c6a1fb
commit 8d79ac08a3
2 changed files with 11 additions and 4 deletions
+4 -1
View File
@@ -6,7 +6,7 @@ import (
)
const (
version = "v1.0.0"
version = "1.0.1"
)
func main() {
@@ -18,6 +18,9 @@ func main() {
mux.HandleFunc("/hello", func(w http.ResponseWriter, r *http.Request) {
json.NewEncoder(w).Encode(map[string]string{"message": "hello world json!"})
})
mux.HandleFunc("/version", func(w http.ResponseWriter, r *http.Request) {
json.NewEncoder(w).Encode(map[string]string{"version": version})
})
http.ListenAndServe(":8080", mux)
}