工作需要go跑一个关于验证码的脚本,第一次使用go,安装完成环境之后,需要get一个脚本的依赖库,在GitHub上:
C:\Users\Ronan\Desktop\***>go get
go: go.mod file not found in current directory or any parent directory; see 'go help modules'
报错后发现是go语言环境变量设置问题
C:\Users\Ronan\Desktop\***>go env -w GO111MODULE=auto
遂解决。
具体原理尚未查明,日后需要用到go进行深入学习的时候再来探究吧