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 ¶
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 ¶
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.