gocover

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package gocover parses Go coverage profiles produced by go test -coverprofile=coverage.out (mode: set | count | atomic).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Parser

type Parser struct{}

Parser handles Go coverage profiles.

func (Parser) Detect

func (Parser) Detect(header []byte) bool

Detect reports whether header looks like a Go coverage profile.

func (Parser) Extensions

func (Parser) Extensions() []string

Extensions returns the file extensions this parser handles.

func (Parser) Name

func (Parser) Name() string

Name returns the parser identifier.

func (Parser) Parse

func (Parser) Parse(r io.Reader, source string) (*covmodel.CovReport, error)

Parse reads a Go coverage profile from r and returns a CovReport. A coverprofile line looks like:

github.com/example/pkg/file.go:10.15,12.3 2 1
                                           ^stmts ^count

Jump to

Keyboard shortcuts

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