Directly visit https://github.com/cosmtrek/air latest official website tutorial
Use go install
to use Go version 1.16 or higher:
go install github.com/cosmtrek/air@latest
First, go into your project folder
The easiest way to do this is to execute
First look for .air.toml
files with the suffix in the current path, if not found, use the default
1
air -c .air.toml
2 You can run the following command to initialize and add the default configuration to the .air.toml file in the current path.
air init
3 After this, you just execute the air command, without adding additional variables, it will use the configuration in the .air.toml file.
air