buildgo

package
v5.3.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2016 License: Apache-2.0 Imports: 17 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package buildgo contains utilities used by plz_go_test. It's split up mostly for ease of testing.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WriteTestMain

func WriteTestMain(pkgDir string, sources []string, output string, coverVars []CoverVar) error

WriteTestMain templates a test main file from the given sources to the given output file. This mimics what 'go test' does, although we do not currently support benchmarks or examples.

Types

type CoverVar

type CoverVar struct {
	Dir, ImportPath, ImportName, Package, Var, File string
}

A CoverVar is just a combination of package path and variable name for one of the templated-in coverage variables.

func FindCoverVars

func FindCoverVars(dir string, exclude []string) ([]CoverVar, error)

FindCoverVars searches the given directory recursively to find all compiled packages in it. From these we extract any coverage variables that have been templated into them; unfortunately this isn't possible to examine dynamically using the reflect package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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