Documentation ¶
Overview ¶
package builder can be used in testing to create a temporary gopath, src, namespace and package directory, and populate it with source files.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
Builder can be used in testing to create a temporary gopath, src, namespace and package directory, and populate it with source files.
func New ¶
New creates a new gopath in the system temporary location, creates the src dir and the namespace dir. The gopath is appended to the beginning of the existing gopath, so existing imports will still work. Remember to defer the Cleanup() method to delete the temporary files.
Click to show internal directories.
Click to hide internal directories.