doc/go1.20.html | 29 ++++++++++++++++++++++++++++- diff --git a/doc/go1.20.html b/doc/go1.20.html index f53680e3ba4fd95767172e0e3637b76bdce9dea0..d14034c2f50f3042ef921b6aff0295323f2e4019 100644 --- a/doc/go1.20.html +++ b/doc/go1.20.html @@ -175,6 +175,14 @@ command line, but we plan to lift this restriction in a future release. 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 @@

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

@@ -283,6 +303,13 @@

The garbage collector behaves less erratically with respect to goroutine 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