Test coverage works on basic blocks. It could be extended to short-circuiting boolean
expressions like f() && g().
Approach:
func GoCoverBool(ret bool, n int) bool {
GoCover.Count[n] = 1
return ret
}
Rewrite f() && g() to f() && GoCoverBool(true, 5) && g() and f()
|| g() to f() || GoCoverBool(false, 5) || g().
I don't know what adjustments to the downstream tools this might require.