GitHub官方 gin-gonic/gin: Gin is a HTTP web framework written in Go (Golang). It features a Martini-like API with much better performance – up to 40 times faster. If you need smashing performance, get yourself some Gin. (github.com) go env -w GOPROXY=https://goproxy.cn,direct go get -u github.com/gin-gonic/gin 我是在GoLand的终端下输入的 测试demo 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() } 可以看到成功运行了 其他参考 (202条消息) 安装Gin 的两种方式_Ssxy0606的博客-优快云博客_gin安装gopkg.in包安装方法get(validator.v8、yaml.v2) - 简书 (jianshu.com)