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.
Thanks, so "not tracked" it is not considered in the coverage percentage.