快速入门
最后更新于:2022-04-02 07:26:02
运行这段代码并在浏览器中访问 http://localhost:8080
```
package main
import "github.com/gin-gonic/gin"
func main() {
r := gin.Default()
r.GET("/ping", func(c *gin.Context) {
c.JSON(200, gin.H{
"message": "pong",
})
})
r.Run() // listen and serve on 0.0.0.0:8080
}
```
';