buildgo

package
v6.0.3+incompatible Latest Latest
Warning

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

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

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