Add fmt rule and format main.go

Need to enforce gofmt, so I've added a rule to remove the need to
remember the command. This includes reformatting main.go as it had
deviated from gofmt rules.