buildutil

package
v0.0.0-...-66d752e Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2015 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Overview

Package buildutil provides utilities related to the go/build package in the standard library.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AllPackages

func AllPackages(ctxt *build.Context) []string

AllPackages returns the import path of each Go package in any source directory of the specified build context (e.g. $GOROOT or an element of $GOPATH). Errors are ignored. The results are sorted.

The result may include import paths for directories that contain no *.go files, such as "archive" (in $GOROOT/src).

All I/O is via the build.Context virtual file system, which must be concurrency-safe.

func ForEachPackage

func ForEachPackage(ctxt *build.Context, found func(importPath string, err error))

ForEachPackage calls the found function with the import path of each Go package it finds in any source directory of the specified build context (e.g. $GOROOT or an element of $GOPATH).

If the package directory exists but could not be read, the second argument to the found function provides the error.

The found function and the build.Context virtual file system accessors must be concurrency safe.

Types

This section is empty.

Jump to

Keyboard shortcuts

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