Has anyone succeeded in generating code coverage for Go unit tests? I can\'t find a tool for that on the web.
A quick and easy way is to use the coverage tool that comes with built-in go :
$ go test -coverprofile cp.out // Emits the coverage in one liner percentage wise
After you execute the above command, if you wish to visually see the code coverage (like covered statements and missed etc)
$ go tool cover -html=cp.out
Note : You need to execute the above commands in the folder where you wish to see coverage