package encodecounter
import "internal/coverage/encodecounter"
Index ¶
- type CounterVisitor
- type CounterVisitorFn
- type CoverageDataWriter
- func NewCoverageDataWriter(w io.Writer, flav coverage.CounterFlavor) *CoverageDataWriter
- func (cfw *CoverageDataWriter) AppendSegment(args map[string]string, visitor CounterVisitor) error
- func (cfw *CoverageDataWriter) Write(metaFileHash [16]byte, args map[string]string, visitor CounterVisitor) error
Types ¶
type CounterVisitor ¶
type CounterVisitor interface { VisitFuncs(f CounterVisitorFn) error }
CounterVisitor describes a helper object used during counter file writing; when writing counter data files, clients pass a CounterVisitor to the write/emit routines, then the expectation is that the VisitFuncs method will then invoke the callback "f" with data for each function to emit to the file.
type CounterVisitorFn ¶
CounterVisitorFn describes a callback function invoked when writing coverage counter data.
type CoverageDataWriter ¶
type CoverageDataWriter struct {
// contains filtered or unexported fields
}
func NewCoverageDataWriter ¶
func NewCoverageDataWriter(w io.Writer, flav coverage.CounterFlavor) *CoverageDataWriter
func (*CoverageDataWriter) AppendSegment ¶
func (cfw *CoverageDataWriter) AppendSegment(args map[string]string, visitor CounterVisitor) error
AppendSegment appends a new segment to a counter data, with a new args section followed by a payload of counter data clauses.
func (*CoverageDataWriter) Write ¶
func (cfw *CoverageDataWriter) Write(metaFileHash [16]byte, args map[string]string, visitor CounterVisitor) error
Write writes the contents of the count-data file to the writer previously supplied to NewCoverageDataWriter. Returns an error if something went wrong somewhere with the write.
Source Files ¶
- Version
- v1.24.1 (latest)
- Published
- Feb 27, 2025
- Platform
- js/wasm
- Imports
- 11 packages
- Last checked
- 2 minutes ago –
Tools for package owners.