Skip to content

Commit 0baede2

Browse files
committed
panic() if listening to port fails
1 parent 8370fc2 commit 0baede2

File tree

1 file changed

+4
-1
lines changed
  • cmd/golang-docker-build-tutorial

1 file changed

+4
-1
lines changed

cmd/golang-docker-build-tutorial/main.go

+4-1
Original file line numberDiff line numberDiff line change
@@ -51,5 +51,8 @@ func (s *Server) MountHandlers() {
5151
func main() {
5252
s := CreateNewServer()
5353
s.MountHandlers()
54-
_ = http.ListenAndServe(":8123", s.Router)
54+
err := http.ListenAndServe(":8123", s.Router)
55+
if err != nil {
56+
panic(err)
57+
}
5558
}

0 commit comments

Comments
 (0)