1
0
mirror of https://github.com/golang/go synced 2024-11-20 04:34:41 -07:00
go/src/cmd/cov/doc.go
Robert Griesemer 3ee87d02b0 cmd/godoc: use go/build to determine package and example files
Also:
- faster code for example extraction
- simplify handling of command documentation:
  all "main" packages are treated as commands
- various minor cleanups along the way

For commands written in Go, any doc.go file containing
documentation must now be part of package main (rather
then package documentation), otherwise the documentation
won't show up in godoc (it will still build, though).

For commands written in C, documentation may still be
in doc.go files defining package documentation, but the
recommended way is to explicitly ignore those files with
a +build ignore constraint to define package main.

Fixes #4806.

R=adg, rsc, dave, bradfitz
CC=golang-dev
https://golang.org/cl/7333046
2013-02-19 11:19:58 -08:00

37 lines
1.0 KiB
Go

// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build ignore
/*
Cov is a rudimentary code coverage tool.
Usage:
go tool cov [-lsv] [-g substring] [-m minlines] [6.out args]
Given a command to run, it runs the command while tracking which
sections of code have been executed. When the command finishes,
cov prints the line numbers of sections of code in the binary that
were not executed. With no arguments it assumes the command "6.out".
The options are:
-l
print full path names instead of paths relative to the current directory
-s
show the source code that didn't execute, in addition to the line numbers.
-v
print debugging information during the run.
-g substring
restrict the coverage analysis to functions or files whose names contain substring
-m minlines
only report uncovered sections of code larger than minlines lines
The program is the same for all architectures: 386, amd64, and arm.
*/
package main