covprofile

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 24, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package covprofile parses Go coverage profiles. It is shared by the dev-only scripts/cov*.go helpers so the profile-line parser has a single implementation instead of being copied per script.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Parse

func Parse(path string) (map[string][]Block, error)

Parse reads a Go coverage profile (the leading `mode:` header line is skipped) and returns blocks grouped by source file path. Malformed lines are skipped, matching `go tool cover` leniency.

Types

type Block

type Block struct {
	StartLine, StartCol int
	EndLine, EndCol     int
	Stmts               int
	Count               int
}

Block is one coverage-profile block: a statement range and its hit count.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL