covcmd

Imports

Imports #

"crypto/sha256"
"fmt"
"internal/coverage"

Structs

CoverFixupConfig struct #

CoverFixupConfig contains annotations/notes generated by the cmd/cover tool (during instrumentation) to be passed on to the compiler when the instrumented code is compiled. The cmd/cover tool creates a struct of this type, JSON-encodes it, and emits the result to a file, which the Go command then passes to the compiler when the instrumented package is built.

type CoverFixupConfig struct {
MetaVar string
MetaLen int
MetaHash string
Strategy string
CounterPrefix string
PkgIdVar string
CounterMode string
CounterGranularity string
}

CoverPkgConfig struct #

CoverPkgConfig is a bundle of information passed from the Go command to the cover command during "go build -cover" runs. The Go command creates and fills in a struct as below, then passes file containing the encoded JSON for the struct to the "cover" tool when instrumenting the source files in a Go package.

type CoverPkgConfig struct {
OutConfig string
PkgPath string
PkgName string
Granularity string
ModulePath string
Local bool
EmitMetaFile string
}

Functions

MetaFileForPackage function #

MetaFileForPackage returns the expected name of the meta-data file for the package whose import path is 'importPath' in cases where we're using meta-data generated by the cover tool, as opposed to a meta-data file created at runtime.

func MetaFileForPackage(importPath string) string

Generated with Arrow