canha/golang-tools-install-script
关于
用于自动安装或卸载 Go 语言工具的简单 Bash 脚本,支持单用户安装。
开发工具实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- 0
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文golang-tools-install-script
Bash script to automate installation and removal of single-user Go language tools.
Feel free to change the variables on the beginning to match whatever version of Go you need.
Tested working on:
- :white_check_mark: Ubuntu
- ⚠️ macOS, generally [^1]
- :white_check_mark: Fedora (Workstation)
[^1]: I no longer have the ability to perform automated testing for free. Testers are welcome!
Supported shells:
- Bash, fish, Zsh
:hammer: Requirements
wgetorcurl- Bash shell
:fast_forward: Install
Download and run with wget or curl. Here's the short version using the official git.io shortening:
# Linux typically has wget installed
wget -q -O - https://git.io/vQhTU | bash
# macOS typically has curl installed
curl -L https://git.io/vQhTU | bash
Or, if you are more comfortable with the raw URL:
wget -q -O - https://raw.githubusercontent.com/canha/golang-tools-install-script/master/goinstall.sh | bash
# or...
curl https://raw.githubusercontent.com/canha/golang-tools-install-script/master/goinstall.sh | bash
:package: Install a custom Go version
Pass the --version option into the script including the version that you wish to install.
Example:
wget -q -O - https://git.io/vQhTU | bash -s -- --version 1.18
# or...
curl -L https://git.io/vQhTU | bash -s -- --version 1.18
:no_entry_sign: Uninstall
Pass the --remove option into the script:
wget -q -O - https://git.io/vQhTU | bash -s -- --remove
# or...
curl -L https://git.io/vQhTU | bash -s -- --remove
:pencil: Notes
By default, the script will create .go and go folders on your home directory and add the needed variables and PATH expansion.
$HOME/.go is the directory where Go will be installed to.
$HOME/go is the default workspace directory.
Read more about the workspace.
In order to install Go into another location, set the environment variables $GOROOT and $GOPATH before (un)installing:
export GOROOT=/opt/go
export GOPATH=$HOME/projects/go
探索相关项目
加载中…