Skip to content

Instantly share code, notes, and snippets.

@ammario
Created September 2, 2016 16:27
Show Gist options
  • Save ammario/8e802dc0595faaed241bad19f72eda5c to your computer and use it in GitHub Desktop.
Save ammario/8e802dc0595faaed241bad19f72eda5c to your computer and use it in GitHub Desktop.
golang test coverage html
#!/bin/bash
go test -coverprofile=coverage.out
go tool cover -html=coverage.out
@joebowbeer
Copy link

go tool conver -html chtml.out

go tool cover -html chtml.out

@judewood
Copy link

In case anyone is seeing this issue. I needed to run 'go tool cover -html=coverage.out' in a bash terminal - it wouldn't work in my VSCode terminal on a Windows machine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment