学好go基础
下载地址
https://golang.google.cn/dl/
go1.20.12.linux-amd64.tar.gz
将解压的文件添加到user/local下
创建软连接全局调用
sudo ln -s /opt/go/bin/* /usr/local/bin
开发软件goland
goland没有代码提示:需要加载goMODE 下载。重启 就好了
goland 插件下载 goanno自动注释插件
配置代理服务器。提示代码
GOPROXY=https://goproxy.cn
gorm链接数据库第三方库
文档地址:https://gorm.io/docs/create.html
go的第三方库链接 大全
地址:https://pkg.go.dev/
go语言文档基础大全
https://studygolang.com/pkgdoc
添加阿里云镜像
linux执行export GOPROXY=https://mirrors.aliyun.com/goproxy
阿里云的不好使用这个镜像
执行 export GOPROXY=https://goproxy.cn
gin框架文档
https://gin-gonic.com/zh-cn/docs/introduction/
https://gin-gonic.com/zh-cn/docs/
执行go文件命令
linux执行 :go run test.go
下载依赖包语句:go get 地址 不加http 要后边的内容
查看环境变量:go env
打包文件: go build XXX.go 生成打包文件
一直执行go文件 :nohup 打包文件地址 &
新建一个项目
新建文件夹 gopapa
执行go mod init gopapa
执行go get -u github.com/gocolly/colly/v2 失败了改上边的镜像