gin入门
时间:2020-03-29 00:21:25
收藏:0
阅读:78
Gin is a web framework written in Go (Golang). It features a martini-like API with performance that is up to 40 times faster thanks to httprouter.
github:https://gitee.com/yuxio/gin.git
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 (for windows "localhost:8080") }
参考:
3. Gin 教程
原文:https://www.cnblogs.com/embedded-linux/p/12589978.html
评论(0)