Air is a tool comparable to nodemon for nodejs. It reloads your development server everytime you change you code. This can be quite handy.
Installation
You can simply install it as a go package.
go install github.com/cosmtrek/air@latest
After that it is placed in you GoPath.
If you don’t know where this is, print the Variable to the Terminal.
echo $GOPATH
For faster access you can create an alias.
alias air='~/go/bin/air'
and to make it permanent use your .bashrc
alias air='~/go/bin/air' >> ~/.bashrc
Usage
To use it you will first need to create a configuration file for it. The default will work in most cases.
air init
After that you can run you Project like this.
air