Merge PR #3975: Missing `source ~/.bash_profile` when setting the go environment
This commit is contained in:
parent
2dfba4ec9b
commit
83f3d1e192
|
@ -0,0 +1 @@
|
||||||
|
3974 Fix go env setting in installation.md
|
|
@ -9,8 +9,8 @@ Install `go` by following the [official docs](https://golang.org/doc/install). R
|
||||||
```bash
|
```bash
|
||||||
mkdir -p $HOME/go/bin
|
mkdir -p $HOME/go/bin
|
||||||
echo "export GOPATH=$HOME/go" >> ~/.bash_profile
|
echo "export GOPATH=$HOME/go" >> ~/.bash_profile
|
||||||
echo "export GOBIN=$GOPATH/bin" >> ~/.bash_profile
|
echo "export GOBIN=\$GOPATH/bin" >> ~/.bash_profile
|
||||||
echo "export PATH=$PATH:$GOBIN" >> ~/.bash_profile
|
echo "export PATH=\$PATH:\$GOBIN" >> ~/.bash_profile
|
||||||
source ~/.bash_profile
|
source ~/.bash_profile
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
@ -9,8 +9,9 @@
|
||||||
```bash
|
```bash
|
||||||
mkdir -p $HOME/go/bin
|
mkdir -p $HOME/go/bin
|
||||||
echo "export GOPATH=$HOME/go" >> ~/.bash_profile
|
echo "export GOPATH=$HOME/go" >> ~/.bash_profile
|
||||||
echo "export GOBIN=$GOPATH/bin" >> ~/.bash_profile
|
echo "export GOBIN=\$GOPATH/bin" >> ~/.bash_profile
|
||||||
echo "export PATH=$PATH:$GOBIN" >> ~/.bash_profile
|
echo "export PATH=\$PATH:\$GOBIN" >> ~/.bash_profile
|
||||||
|
source ~/.bash_profile
|
||||||
```
|
```
|
||||||
|
|
||||||
::: 提示
|
::: 提示
|
||||||
|
|
|
@ -7,10 +7,11 @@
|
||||||
공식 [Go 문서](https://golang.org/doc/install)를 따라서 `go`를 설치하십시오. `$GOPATH`, `$GOBIN`, 그리고 `$PATH`의 환경을 꼭 세팅하세요. 예시:
|
공식 [Go 문서](https://golang.org/doc/install)를 따라서 `go`를 설치하십시오. `$GOPATH`, `$GOBIN`, 그리고 `$PATH`의 환경을 꼭 세팅하세요. 예시:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
mkdir -p $HOME/go/b4n
|
mkdir -p $HOME/go/bin
|
||||||
echo "export GOPATH=$HOME/go" >> ~/.bash_profile
|
echo "export GOPATH=$HOME/go" >> ~/.bash_profile
|
||||||
echo "export GOBIN=$GOPATH/bin" >> ~/.bash_profile
|
echo "export GOBIN=\$GOPATH/bin" >> ~/.bash_profile
|
||||||
echo "export PATH=$PATH:$GOBIN" >> ~/.bash_profile
|
echo "export PATH=\$PATH:\$GOBIN" >> ~/.bash_profile
|
||||||
|
source ~/.bash_profile
|
||||||
```
|
```
|
||||||
|
|
||||||
::: tip
|
::: tip
|
||||||
|
|
Loading…
Reference in New Issue