fix: add err check
This commit is contained in:
7
main.go
7
main.go
@@ -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)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user