https://github.com/forecho/hi-go
学习 Golang
https://github.com/forecho/hi-go
Last synced: about 1 year ago
JSON representation
学习 Golang
- Host: GitHub
- URL: https://github.com/forecho/hi-go
- Owner: forecho
- Created: 2018-10-22T01:41:06.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2019-12-05T03:12:57.000Z (over 6 years ago)
- Last Synced: 2024-12-25T07:22:21.394Z (over 1 year ago)
- Language: Go
- Size: 4.88 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Go 学习笔记
## 安装 Go
### Linux
- 下载源码
```sh
wget https://dl.google.com/go/go1.11.5.linux-amd64.tar.gz
sudo tar -C /usr/local -xzf go1.11.5.linux-amd64.tar.gz
```
- 处理环境变量
修改 `.bashrc` 或者 `.zshrc` 文件,添加:
```
export PATH=$PATH:/usr/local/go/bin
```
如果需要自定义 `GOPATH` (工作目录)
```
export GOPATH=$HOME/Code/go
export PATH=$PATH:/usr/local/go/bin:$GOPATH/bin
```
## [包管理器 Dep](https://github.com/golang/dep)
安装
```sh
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
```