encodemeta

原文:https://pkg.go.dev/internal/coverage/encodemeta@go1.23.0

常量

This section is empty.

变量

This section is empty.

函数

func HashFuncDesc

1
func HashFuncDesc(f *coverage.FuncDesc) [16]byte

HashFuncDesc computes an md5 sum of a coverage.FuncDesc and returns a digest for it.

类型

type CoverageMetaDataBuilder

1
2
3
type CoverageMetaDataBuilder struct {
	// contains filtered or unexported fields
}

func NewCoverageMetaDataBuilder

1
func NewCoverageMetaDataBuilder(pkgpath string, pkgname string, modulepath string) (*CoverageMetaDataBuilder, error)

(*CoverageMetaDataBuilder) AddFunc

1
func (b *CoverageMetaDataBuilder) AddFunc(f coverage.FuncDesc) uint

AddFunc registers a new function with the meta data builder.

(*CoverageMetaDataBuilder) Emit

1
func (b *CoverageMetaDataBuilder) Emit(w io.WriteSeeker) ([16]byte, error)

Emit writes the meta-data accumulated so far in this builder to ‘w’. Returns a hash of the meta-data payload and an error.

type CoverageMetaFileWriter

1
2
3
type CoverageMetaFileWriter struct {
	// contains filtered or unexported fields
}

func NewCoverageMetaFileWriter

1
func NewCoverageMetaFileWriter(mfname string, w io.Writer) *CoverageMetaFileWriter

(*CoverageMetaFileWriter) Write

1
func (m *CoverageMetaFileWriter) Write(finalHash [16]byte, blobs [][]byte, mode coverage.CounterMode, granularity coverage.CounterGranularity) error