Documentation ¶
Overview ¶
* @Date: 2021-01-18 17:42:17 * @LastEditors: aiden.deng (Zhenpeng Deng) * @LastEditTime: 2021-01-18 21:05:33
Index ¶
- type FileCoverage
- type FuncCoverage
- type FuncExtent
- type FuncVisitor
- type PackageCoverage
- type Pkg
- type Profiles
- func (ps *Profiles) Add(p *cover.Profile)
- func (ps *Profiles) FileLevelPercentageCovered() ([]*FileCoverage, error)
- func (ps *Profiles) FuncLevelPercentageCovered() ([]*FuncCoverage, error)
- func (ps *Profiles) PackageLevelPercentageCovered() ([]*PackageCoverage, error)
- func (ps *Profiles) Packages() ([]*Pkg, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileCoverage ¶
func (*FileCoverage) Percentage ¶
func (f *FileCoverage) Percentage() float64
type FuncCoverage ¶
type FuncCoverage struct { FuncName string StartLine int Filename string Pkg *Pkg Profile *cover.Profile Covered int Total int }
func (*FuncCoverage) Percentage ¶
func (f *FuncCoverage) Percentage() float64
type FuncExtent ¶
type FuncExtent struct {
// contains filtered or unexported fields
}
FuncExtent describes a function's extent in the source by file and position.
type FuncVisitor ¶
type FuncVisitor struct {
// contains filtered or unexported fields
}
FuncVisitor implements the visitor that builds the function position list for a file.
type PackageCoverage ¶
type PackageCoverage struct { PackageName string Pkg *Pkg Profile *cover.Profile Covered int Total int }
func (*PackageCoverage) Percentage ¶
func (p *PackageCoverage) Percentage() float64
type Pkg ¶
Pkg describes a single package, compatible with the JSON output from 'go list'; see 'go help list'.
type Profiles ¶
func ParseProfiles ¶
func (*Profiles) FileLevelPercentageCovered ¶
func (ps *Profiles) FileLevelPercentageCovered() ([]*FileCoverage, error)
func (*Profiles) FuncLevelPercentageCovered ¶
func (ps *Profiles) FuncLevelPercentageCovered() ([]*FuncCoverage, error)
func (*Profiles) PackageLevelPercentageCovered ¶
func (ps *Profiles) PackageLevelPercentageCovered() ([]*PackageCoverage, error)
Click to show internal directories.
Click to hide internal directories.