type CoverBlock … var cover … type Cover … // Coverage reports the current code coverage as a fraction in the range [0, 1]. // If coverage is not enabled, Coverage returns 0. // // When running a large set of sequential test cases, checking Coverage after each one // can be useful for identifying which test cases exercise new code paths. // It is not a replacement for the reports generated by 'go test -cover' and // 'go tool cover'. func Coverage() float64 { … } // RegisterCover records the coverage data accumulators for the tests. // NOTE: This function is internal to the testing infrastructure and may change. // It is not covered (yet) by the Go 1 compatibility guidelines. func RegisterCover(c Cover) { … } // mustBeNil checks the error and, if present, reports it and exits. func mustBeNil(err error) { … } // coverReport reports the coverage percentage and writes a coverage profile if requested. func coverReport() { … }