gin入门
Posted embedded-linux
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了gin入门相关的知识,希望对你有一定的参考价值。
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 教程
以上是关于gin入门的主要内容,如果未能解决你的问题,请参考以下文章