air-verse / air

☁️ Live reload for Go apps
GNU General Public License v3.0
16.35k stars 771 forks source link

Fix go directive to avoid language version #553

Open haruyama480 opened 3 months ago

haruyama480 commented 3 months ago

Specifying 1.22 (referred to as the language version) without the toolchain directive causes compilation to fail when developers uses older go like 1.21. To workaround, I recommend to specify go 1.22.0.

https://github.com/golang/go/issues/62278#issuecomment-2015737150

haruyama480 commented 2 months ago

https://github.com/cosmtrek/air/pull/529#discussion_r1493807604

Yes, the following error is local issue.

go: downloading go1.22 (darwin/arm64)
go: download go1.22 for darwin/arm64: toolchain not available

However, this merge works well without above error.