Home > Article > Backend Development > How to install go’s automatic reloading tool
The following tutorial column will introduce you to the automatic reloading tool installation of go. I hope it will be helpful to friends who need it!
Installing air
go env -w GOPROXY=https://goproxy.cnAfter successful setting, use the following command to install air:
GO111MODULE=on go get -u github.com/cosmtrek/air
(under windows github.com/cosmtrek/air/releases Download here and put it into the Go installation directory bin directory under the command, rename it to air.exe)
The first GO111MODULE=on only enables Go Module for the current command. After it is enabled, we can use Go Proxy for acceleration.Note: If you encounter errors during the above operations, please first ensure that your Go version is 1.15. Use this command to check the go version
After the installation is successful, use the following command to check:air -v __ _ ___ / /\ | | | |_)/_/--\ |_| |_| \_ v1.12.1 // live reload for Go apps, with Go1.14.0
To use air
airin the project root directory.
The above is the detailed content of How to install go’s automatic reloading tool. For more information, please follow other related articles on the PHP Chinese website!