I've started a small Go application to test it out and learn. In the main package I have a main.go
with for example a function called NewApp
.
In my test file I've called it several times, but in the coverage report its first line is marked as "not tracked". This function returns an App struct
, but the whole struct definition is marked as "not tracked" to.
On the other hand I can't understand the difference between "not covered" and "not tracked". And is there a way to test the main function? I can't see the advantage of that.
My code is here .
谢谢,因此“未跟踪”不在覆盖率范围内。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.