本文共 1002 字,大约阅读时间需要 3 分钟。
linux 下环境变量
vi /etc/profile# Go settingexport GOROOT=/usr/local/go export GOPATH=~/golib:~/goprojectexport GOBIN=~/gobin export PATH=$PATH:$GOROOT/bin:$GOBIN
{ "version": "0.2.0", "configurations": [ { "name": "LaunchGo", "type": "go", "request": "launch", "mode": "debug", "remotePath": "", "port": 5546, "host": "127.0.0.1", "program": "${file}", //这个配置成你要调试的文件、${file}当前打开的文件 "env": { "INFLUXDB_PW":"influxinflux", "GOPATH": "D:/go-workspace", "GOROOT": "D:/Go" }, "args": ["--influxdb.username=influx", "--influxdb.database=prometheus","--influxdb-url=http://10.130.135.79:8086/"], //"showLog": true } ]}
go mod download 下载模块到本地缓存,缓存路径是 $GOPATH/pkg/mod/cache
转载地址:http://vfvli.baihongyu.com/