让gin运行起来

运行gin框架过程学习到如下知识点

知识点

  • go env 查看go环境配置
  • go help [command] 查看命令帮助
  • go env -w [var] 更改环境变量
  • go mod init xxx 初始化模块管理文件(类似于 npm init 生成package.json
  • go get github.com/gin-gonic/gin 下载包(类似于npm install

说明:

GO111MODULE是go的模块化开关,设置为on就可以像npm一样方便的管理管理模块了
GOPROXY可以设置代理,避免被墙,GOPROXY="https://goproxy.cn,direct"

gin官网:https://gin-gonic.com/zh-cn/docs/introduction/

posted @ 2022-03-15 20:45  平芜尽处是春山  阅读(155)  评论(0编辑  收藏  举报