|
|
|
@ -2,19 +2,19 @@
|
|
|
|
|
wget -c https://studygolang.com/dl/golang/go1.14.6.linux-amd64.tar.gz
|
|
|
|
|
tar -C /usr/local/ -zxvf go1.14.6.linux-amd64.tar.gz
|
|
|
|
|
|
|
|
|
|
echo "export PATH=$PATH:/usr/local/go/bin" >> /etc/profile.d/go.sh
|
|
|
|
|
echo "export PATH=$PATH:/home/user/go/bin" >> /etc/profile.d/go.sh
|
|
|
|
|
echo "export PATH=$PATH:/root/go/bin" >> /etc/profile.d/go.sh
|
|
|
|
|
echo "export PATH=$PATH:/usr/local/go/bin:/home/user/go/bin" >> /etc/profile.d/go.sh
|
|
|
|
|
source /etc/profile.d/go.sh
|
|
|
|
|
|
|
|
|
|
mkdir -p ~/home/user/go
|
|
|
|
|
echo "export GOPATH=/home/user/go" >> /etc/profile.d/gopath.sh
|
|
|
|
|
#设置代理
|
|
|
|
|
echo "export GO111MODULE=on" >> /etc/profile.d/gopath.sh
|
|
|
|
|
echo "export GOPROXY=https://goproxy.cn,direct" >> /etc/profile.d/gopath.sh
|
|
|
|
|
|
|
|
|
|
source /etc/profile.d/gopath.sh
|
|
|
|
|
chmod +x /etc/profile.d/*.sh
|
|
|
|
|
echo $GOPATH
|
|
|
|
|
|
|
|
|
|
#设置代理
|
|
|
|
|
go env -w GOPROXY=https://goproxy.cn,direct
|
|
|
|
|
|
|
|
|
|
# 下载dlv
|
|
|
|
|
yum install git -y
|
|
|
|
@ -23,6 +23,7 @@ go get github.com/go-delve/delve/cmd/dlv
|
|
|
|
|
# Goland配置方法
|
|
|
|
|
https://www.jianshu.com/p/e74e940a64d9
|
|
|
|
|
|
|
|
|
|
cd /usr/local/dsMin/dsBaseRpc
|
|
|
|
|
dlv --listen=:2345 --headless=true --api-version=2 exec ./dsBaseRpc
|
|
|
|
|
|
|
|
|
|
# 构建
|
|
|
|
|