goland how to use gofmt?

You can do that in one of these two ways: For Goland: preferences ->Tools ->File Watchers and enable go fmt. This way on each saves it will format the file. once your code is done. just run the command gofmt -s -w . in the terminal in the required directory or else in the needed … Read more