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() 13 }
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() 13 }