cover

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type File

type File struct {
	Name       string
	TotalStmts int
	Uncovered  int
	Lines      []*Line
}

func (File) Coverage

func (f File) Coverage() float64

type FileParser

type FileParser struct {
	// contains filtered or unexported fields
}

func NewFileParser

func NewFileParser(filePath string) *FileParser

func (*FileParser) Parse

func (fp *FileParser) Parse(_ context.Context) (*Report, error)

type Line

type Line struct {
	Start int
	End   int
}

type Parser

type Parser interface {
	Parse(context.Context) (*Report, error)
}

type Report

type Report struct {
	TotalStmts int
	Uncovered  int
	Files      []*File
}

func (Report) Coverage

func (r Report) Coverage() float64

Jump to

Keyboard shortcuts

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