gopath管理项目 工程目录src下编写你的代码,配置gopath 为当前目录,src 下面会生成当前的第三方依赖包 设置环境代理 mac export GOPROXY="https://goproxy.cn,direct" windows 执行 set GOPROXY="https://goproxy.cn,direct" 依赖管理下载所有依赖包 go get -d -v ./... 最后可以运行你的项目了!