4 ms·
It's my understanding that the Go compiler will format your code every time you compile. For Rust, its a separate tool invocation.
by pitaj 3y ago
It's my understanding that the Go compiler will format your code every time you compile. For Rust, its a separate tool invocation.
- masklinn 3y ago> It's my understanding that the Go compiler will format your code every time you compile. I do not believe that is the case. You have to invoke `gofmt` or `go fmt` on the project. You may hook it to precommit, or your editor might be configured to automatically run it on save, but afaik neither `go build` nor `go run` will auto-format.
- bananapub 3y ago> It's my understanding that the Go compiler will format your code every time you compile. incorrect. perhaps you're mixing that up with your editor doing it on save. > For Rust, its a separate tool invocation. literally go has gofmt and rust has rustfmt.