title: How to ignore generated files from Go test coverage
body: <p>I have a generated file in my package with <code>DO NOT EDIT</code> on top. I am running tests for my package with <code>go test -coverprofile=cover.out &lt;package&gt;</code>. This creates coverage profile and shows total coverage percentage. But it also includes generated files while calculating the coverage. Is there a way to ignore generated files in coverage calculation?</p>