Advertisement
Guest User

Untitled

a guest
May 21st, 2019
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Go 0.23 KB | None | 0 0
  1. package main
  2.  
  3. import "github.com/gin-gonic/gin"
  4.  
  5. func main() {
  6.     r := gin.Default()
  7.     r.GET("/ping", func(c *gin.Context) {
  8.         c.JSON(200, gin.H{
  9.             "message": "pong",
  10.         })
  11.     })
  12.     r.Run() // listen and serve on 0.0.0.0:8080
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement