查看“Gin”的源代码
←
Gin
跳到导航
跳到搜索
因为以下原因,您没有权限编辑本页:
您所请求的操作仅限于该用户组的用户使用:
用户
您可以查看与复制此页面的源代码。
[[category:go]] =install= ==pre install golang== [[Golang]] <pre> #apt #可以指定版本的 sudo apt install golang sudo apt install golang-go gccgo-go sudo apt install golang-go </pre> == install Gin package== export PATH=/usr/local/go/bin/:$PATH export GOPATH=/root/go #if U user is root === If you're in China=== <pre> go env -w GO111MODULE=on go env -w GOPROXY=https://mirrors.aliyun.com/goproxy/,direct </pre> go get -u github.com/gin-gonic/gin =Use a vendor tool like Govendor= go get github.com/kardianos/govendor sudo apt install govendor # apt mkdir -p $GOPATH/src/github.com/myusername/project && cd "$_" ==Vendor init your project and add gin == <pre> govendor init govendor fetch github.com/gin-gonic/gin@v1.3 #有时要绝对路径 /root/go/bin/govendor fetch github.com/gin-gonic/gin@v1.6 </pre> =trouble= ==1.6 err== <pre> # go run main.go # github.com/myusername/project/vendor/github.com/gin-gonic/gin vendor/github.com/gin-gonic/gin/context.go:36:26: undefined: binding.MIMEYAML vendor/github.com/gin-gonic/gin/context.go:600:29: undefined: binding.YAML vendor/github.com/gin-gonic/gin/context.go:605:29: undefined: binding.Header vendor/github.com/gin-gonic/gin/context.go:659:31: undefined: binding.YAML vendor/github.com/gin-gonic/gin/context.go:664:31: undefined: binding.Header vendor/github.com/gin-gonic/gin/context.go:673:9: undefined: binding.Uri vendor/github.com/gin-gonic/gin/context.go:896:17: undefined: render.PureJSON vendor/github.com/gin-gonic/gin/context.go:912:17: undefined: render.ProtoBuf vendor/github.com/gin-gonic/gin/context.go:1027:7: undefined: binding.MIMEYAML vendor/github.com/gin-gonic/gin/mode.go:83:2: undefined: binding.EnableDecoderDisallowUnknownFields </pre>
返回至
Gin
。
导航菜单
个人工具
登录
名字空间
页面
讨论
变种
视图
阅读
查看源代码
查看历史
更多
搜索
导航
首页
我的导航
关于我
shell
python
ops
linuxchina.net
blog.linuxchina
最近更改
随机页面
帮助
工具
链入页面
相关更改
特殊页面
页面信息