Source file src/cmd/cover/doc.go
1 // Copyright 2013 The Go Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 /* 6 Cover is a program for analyzing the coverage profiles generated by 7 'go test -coverprofile=cover.out'. 8 9 Cover is also used by 'go test -cover' to rewrite the source code with 10 annotations to track which parts of each function are executed. 11 It operates on one Go source file at a time, computing approximate 12 basic block information by studying the source. It is thus more portable 13 than binary-rewriting coverage tools, but also a little less capable. 14 For instance, it does not probe inside && and || expressions, and can 15 be mildly confused by single statements with multiple function literals. 16 17 When computing coverage of a package that uses cgo, the cover tool 18 must be applied to the output of cgo preprocessing, not the input, 19 because cover deletes comments that are significant to cgo. 20 21 For usage information, please see: 22 go help testflag 23 go tool cover -help 24 */ 25 package main 26