fix: add err check

This commit is contained in:
2026-01-03 18:00:36 +08:00
parent a8b3a34db7
commit d388b3e383

View File

@@ -1,11 +1,14 @@
package main package main
import ( import (
"net/http"
"k8s-example/hello" "k8s-example/hello"
"net/http"
) )
func main() { func main() {
http.HandleFunc("/hello", hello.Handler) http.HandleFunc("/hello", hello.Handler)
http.ListenAndServe(":8800", nil) err := http.ListenAndServe(":8800", nil)
} if err != nil {
panic(err)
}
}