1
0
mirror of https://github.com/golang/go synced 2024-11-17 22:05:02 -07:00

cmd: add a new goexperiment for redesigned code coverage

Add a new "coverageredesign" GOEXPERIMENT (currently off by default),
for gating the use of the new code coverage design/implementation.

Updates #51430.

Change-Id: Ia61da869fcd0d61c6163f734e2fe5e3705f37a91
Reviewed-on: https://go-review.googlesource.com/c/go/+/395894
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: David Chase <drchase@google.com>
Run-TryBot: Than McIntosh <thanm@google.com>
Reviewed-by: Austin Clements <austin@google.com>
This commit is contained in:
Than McIntosh 2022-02-14 15:00:38 -05:00
parent 52f9c6fdb0
commit a3434b71a3
3 changed files with 22 additions and 0 deletions

View File

@ -0,0 +1,9 @@
// Code generated by mkconsts.go. DO NOT EDIT.
//go:build !goexperiment.coverageredesign
// +build !goexperiment.coverageredesign
package goexperiment
const CoverageRedesign = false
const CoverageRedesignInt = 0

View File

@ -0,0 +1,9 @@
// Code generated by mkconsts.go. DO NOT EDIT.
//go:build goexperiment.coverageredesign
// +build goexperiment.coverageredesign
package goexperiment
const CoverageRedesign = true
const CoverageRedesignInt = 1

View File

@ -86,4 +86,8 @@ type Flags struct {
// has been broken out to its own experiment that is disabled
// by default.
HeapMinimum512KiB bool
// CoverageRedesign enables the new compiler-based code coverage
// tooling.
CoverageRedesign bool
}