Skip to content

Instantly share code, notes, and snippets.

@aalvesjr
Created April 3, 2017 01:39
Show Gist options
  • Save aalvesjr/12f4980e1884c86fbf73630bb9a5d611 to your computer and use it in GitHub Desktop.
Save aalvesjr/12f4980e1884c86fbf73630bb9a5d611 to your computer and use it in GitHub Desktop.
Golang more detailed testing
# covermodes: set, atomic, count
go test -coverprofile="coverage.out" -covermode count
# coverage by function
go tool cover --func="coverage.out"
# HTML
go tool cover -html=coverage.out -o coverage.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment