Cross-package coverage is not supported directly, but several people have built-in wrappers to combine individual coverage profiles.
See Issue No. 6909 for this story. And look at gotestcover for an example merge tool. There is also a gocovmerge . I built my own version, so I have not tried any of them, but I'm sure that they all work as mine, and mine work fine.
I mean, it's just a problem that no one wrote a really attractive list of changes and was not so important for the main developers, so it was not considered. This causes small corner cases that may disrupt existing tests, so the fast hacks that work for most of us have not been taken as is. But I did not see any discussion suggesting that the main developers are actively opposing this feature.
source share