diff --git a/doc/go1.20.html b/doc/go1.20.html index f53680e3ba4..d14034c2f50 100644 --- a/doc/go1.20.html +++ b/doc/go1.20.html @@ -175,6 +175,14 @@ Do not send CLs removing the interior tags from such phrases. Specifying -pgo=off turns off profile-guided optimization.

+

+ The go build, go install, + and other build-related commands now support a -cover + flag that builds the specified target with code coverage instrumentation. + This is described in more detail in the + Cover section below. +

+

go version

@@ -228,7 +236,19 @@ Do not send CLs removing the interior tags from such phrases.

Cover

- TODO coverage + Go 1.20 supports collecting code coverage profiles for programs + (applications and integration tests), as opposed to just unit tests. +

+ +

+ To collect coverage data for a program, build it with go + build's -cover flag, then run the resulting + binary with the environment variable GOCOVERDIR set + to an output directory for coverage profiles. + See the + 'coverage for integration tests' landing page for more on how to get started. + For details on the design and implementation, see the + proposal.

Vet

@@ -285,6 +305,13 @@ Do not send CLs removing the interior tags from such phrases. assists in some circumstances.

+

+ Go 1.20 adds a new runtime/coverage package + containing APIs for writing coverage profile data at + runtime from a long-running and/or server programs that + do not terminate via os.Exit(). +

+

Compiler