Go

File is not `gofmt`-ed with `-s`

Quick tip today, hopefully to save you a headache: if in a Go project you get the error File is not gofmt-ed with -s (the error will likely show a file path), try to run this command to fix it: gofmt -w <file_path>. The file is likely not properly formatted according to Go rules, in my case I had accidentally used tab indentation rather than spaces… 😣


People demand freedom of speech to make up for the freedom of thought which they avoid. Socrates

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.