# test
go test -v ./...
# coverage
go test -coverprofile cover.out ./...
We will primarily be using VS Code.
here are some extensions you can use to make the sharing the coding a bit easier:
{
"folders": [
{
"path": "."
}
],
"settings": {
"coverage-gutters.coverageReportFileName": "coverage.xml",
"go.coverOnSave": true,
"go.coverOnSingleTest": true,
"go.coverOnSingleTestFile": true,
"go.testOnSave": true,
"emeraldwalk.runonsave": {
"commands": [
{
"match": "\\.go$",
"isAsync": true,
"cmd": "gocov convert cover.out | gocov-xml > coverage.xml"
}
]
}
}
}
godoc -http=localhost:6060
Point your browser to http://localhost:6060/pkg/github.com/clean-code-projects/co-coders-api/