开发环境搭建
设置镜像源
在国内下载依赖比较慢,甚至是超时,需要配置镜像源。
shell
go env -w GOPROXY=https://mirrors.aliyun.com/goproxy/,direct如果不进行配置,下载依赖时可能出现类似下方错误。
shell
connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.