# go-student **Repository Path**: byte-go/go-student ## Basic Information - **Project Name**: go-student - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 1 - **Created**: 2021-12-21 - **Last Updated**: 2021-12-21 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README go-student === .bashrc配置环境变量 ```shell export GOROOT=/opt/iris/go1.17.3.linux-amd64/go export GOPATH=/home/iris/Project/Go/go export PATH=$PATH:$GOROOT/bin export PATH=$PATH:$GOPATH/bin # 代理配置 export GO111MODULE=on export GOPROXY=https://goproxy.cn ``` # 代理 https://goproxy.cn/ ```shell GOPROXY=https://goproxy.cn,direct ``` # 安装包 ```shell go mod download ``` # 热加载运行 本程序可以使用air运行方式热加载程序 ```shell air ``` ```shell go run ./ ``` ```shell go run main.go studentInfo.go ``` ### air安装 ``` go get -u github.com/cosmtrek/air ``` go 1.17.3版本废弃了go get ```shell go install github.com/cosmtrek/air ``` 已经在go.mod文件中配置了依赖 ``` github.com/cosmtrek/air v1.12.4 // indirect ``` 新建一个文件 ``` touch .air.toml ``` ### 构建部署 ```shell go build -o student main.go studentInfo.go ``` ```shell go build -o student ./ ```