From d388b3e383bca3d11afb7404e470af4ae0b3159c Mon Sep 17 00:00:00 2001 From: Zpekii Date: Sat, 3 Jan 2026 18:00:36 +0800 Subject: [PATCH] fix: add err check --- main.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/main.go b/main.go index b26de2d..6593ee0 100644 --- a/main.go +++ b/main.go @@ -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) -} \ No newline at end of file + err := http.ListenAndServe(":8800", nil) + if err != nil { + panic(err) + } +}