gotools/cover/profile.go

type Profile

type ProfileBlock

type byFileName

func (p byFileName) Len() int           {}

func (p byFileName) Less(i, j int) bool {}

func (p byFileName) Swap(i, j int)      {}

// ParseProfiles parses profile data in the specified file and returns a
// Profile for each source file described therein.
func ParseProfiles(fileName string) ([]*Profile, error) {}

// ParseProfilesFromReader parses profile data from the Reader and
// returns a Profile for each source file described therein.
func ParseProfilesFromReader(rd io.Reader) ([]*Profile, error) {}

// parseLine parses a line from a coverage file.
// It is equivalent to the regex
// ^(.+):([0-9]+)\.([0-9]+),([0-9]+)\.([0-9]+) ([0-9]+) ([0-9]+)$
//
// However, it is much faster: https://golang.org/cl/179377
func parseLine(l string) (fileName string, block ProfileBlock, err error) {}

// seekBack searches backwards from end to find sep in l, then returns the
// value between sep and end as an integer.
// If seekBack fails, the returned error will reference what.
func seekBack(l string, sep byte, end int, what string) (value int, nextSep int, err error) {}

type blocksByStart

func (b blocksByStart) Len() int      {}

func (b blocksByStart) Swap(i, j int) {}

func (b blocksByStart) Less(i, j int) bool {}

type Boundary

// Boundaries returns a Profile as a set of Boundary objects within the provided src.
func (p *Profile) Boundaries(src []byte) (boundaries []Boundary) {}

type boundariesByPos

func (b boundariesByPos) Len() int      {}

func (b boundariesByPos) Swap(i, j int) {}

func (b boundariesByPos) Less(i, j int) bool {}