
开发环境配置
开发环境
GO
# go 开发环境
export GOROOT=/usr/local/go
export GOPATH=~/gopath
export PATH=$PATH:$GOROOT/bin:$PATH:$GOPATH/BIN
# go goproxy.cn
export GO111MODULE=on
export GOPROXY=https://goproxy.cn
终端代理
# 代理
alias onproxy='export http_proxy=http://127.0.0.1:8889;export https_proxy=http://127.0.0.1:8889;'
alias unproxy='unset all_proxy'
brew
-
brew 国内镜像源
-
自动脚本 常规安装脚本(推荐 完全体 几分钟安装完成):
/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"
-
卸载脚本:
/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/HomebrewUninstall.sh)"
-
常见错误去下方地址查看
https://gitee.com/cunkai/HomebrewCN/blob/master/error.md
oh my zsh
-
官网:
https://ohmyz.sh/#install
-
主题
cloud
-
插件
git zsh-autosuggestions zsh-syntax-highlighting autojump
git
- 配置账户和邮箱
git config --global user.name "你的账户" git config --global user.email "你的邮箱"
- 生成秘钥
ssh-keygen -t rsa -C "你的邮箱"
IDE配置
Goland
插件
CodeGlance Pro
Git Commit Template
GitToolBox
Gopher
Rainbow Brackets
(关闭没必要的插件)
设置
- 关闭自动更新
- 自动格式化
- gopath
- CodeStyle
NeoVim
nvim golang 开发环境配置
参考资料
[1] https://mp.weixin.qq.com/s/K6Cl2Gm83FYBZRroabjeMw
[2] https://www.jianshu.com/p/e3d07566c002