Skip to content

Instantly share code, notes, and snippets.

@orasik
Created December 27, 2017 10:54
Show Gist options
  • Save orasik/c1399a994581fae76c2a1c7ed2597cb8 to your computer and use it in GitHub Desktop.
Save orasik/c1399a994581fae76c2a1c7ed2597cb8 to your computer and use it in GitHub Desktop.
Go code analysis
#!/bin/bash
# Run this file inside your go project
# This will format your go files and write to them
gofmt -w *.go
# It will suggest style mistakes and missing docs, you'll need to manually fix them
# to install: go get -u github.com/golang/lint/golint
golint *.go
# examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string.
go vet
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment