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
import (
"net/http"
"k8s-example/hello"
"net/http"
)
func main() {
http.HandleFunc("/hello", hello.Handler)
http.ListenAndServe(":8800", nil)
}
err := http.ListenAndServe(":8800", nil)
if err != nil {
panic(err)
}
}