I have a generated file in my package with DO NOT EDIT
on top. I am running tests for my package with go test -coverprofile=cover.out <package>
. 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?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…