Essential Go Testing  Suggest an edit

View code coverage in HTML format

Run go test as normal, yet with the coverprofile flag. Then use go tool to view the results as HTML.

go test -coverprofile=c.out
go tool cover -html=c.out

  ↑ ↓ to navigate     ↵ to select     Esc to close