func funcOutput(profile, outputFile string) error { … } // findFuncs parses the file and returns a slice of FuncExtent descriptors. func findFuncs(name string) ([]*FuncExtent, error) { … } type FuncExtent … type FuncVisitor … // Visit implements the ast.Visitor interface. func (v *FuncVisitor) Visit(node ast.Node) ast.Visitor { … } // coverage returns the fraction of the statements in the function that were covered, as a numerator and denominator. func (f *FuncExtent) coverage(profile *cover.Profile) (num, den int64) { … } type Pkg … func findPkgs(profiles []*cover.Profile) (map[string]*Pkg, error) { … } // findFile finds the location of the named file in GOROOT, GOPATH etc. func findFile(pkgs map[string]*Pkg, file string) (string, error) { … } func percent(covered, total int64) float64 { … }