Jelajahi Sumber

Output message when gin-std server is ready (#7997)

I could use this to detect when the application has started before sending some request. Currently nothing is displayed at all.

@0uep is there a better way to do this?
Sébastien Ros 2 tahun lalu
induk
melakukan
6070d42218
1 mengubah file dengan 1 tambahan dan 0 penghapusan
  1. 1 0
      frameworks/Go/gin/gin-std/main.go

+ 1 - 0
frameworks/Go/gin/gin-std/main.go

@@ -153,6 +153,7 @@ func main() {
 	r.GET("/fortunes", fortunes)
 	r.GET("/fortunes", fortunes)
 	r.GET("/update", update)
 	r.GET("/update", update)
 	r.GET("/plaintext", plaintext)
 	r.GET("/plaintext", plaintext)
+	log.Print("Listening and serving HTTP\n")
 	r.Run(":8080")
 	r.Run(":8080")
 }
 }