Ignore coverage for a file but need the code to be available to use

Hi Team,

We have a file say ExportedFunctions.go in PkgA which is kept to export a few functions from PkgA for coverage purpose…for our test framework in PkgB. Now if I include the build tag in ExportedFunctions.go to exclude it from the build, the functions won’t be available for use as the file will be ignored while the build process.
If I don’t use the build tag, the file will be shown in the coverage report which is not required.

Now how can I ignore the file from the coverage report and still be able to call functions from ExportedFunctions.go file?

Kindly suggest. Any help would be much appreciated.

Thanks.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.