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 上 Gin 的简介 Gin 是一个用 Go 写的 HTTP web
首先我们得先安装这两个工具: google的pprof工具链 go get -u github.com/google/pprof gin的pprof工具 go get github.com/DeanThompson/ginpprof 在ginpprof可以很容易就实现集成pprof服务. ginpprof.Wrap(router) 启动web服务之后,在浏览器中打开http://localhost:port/debug/pprof/即可看见: 然后我们打开http://localhost:po
package main import ( "github.com/gin-gonic/gin" "net/http" ) type Person struct { Id string `uri:"id" binding:"required,uuid"` Name string `uri:"name" binding:"required"` } func main() { r := gi