goland how to use gofmt?

You can do that in one of these two ways:

  1. For Goland: preferences ->Tools ->File Watchers and enable go fmt. This way on each saves it will format the file.

  2. once your code is done. just run the command gofmt -s -w . in the terminal in the required directory or else in the needed file. it will format your whole directory/file as per your need.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)