Closed xhd2015 closed 1 week ago
The situation is quite a corner case but yet common: the target package does not import github.com/xhd2015/xgo/runtime/trace
, so trigger auto load. But since -cover
is used, these files, firstly replaced by xgo, then replaced by go tool cover
.
I may attribute this a bug to the go test -cover
but there is a workaround: just instrument the .go
and _test.go
each at least for once.
This maybe caused by absence of blank import after rewritten by
-cover
.