Documentation ¶
Overview ¶
The drivertest package provides a fake implementation of the go/packages driver protocol that delegates to the go list driver. It may be used to test programs such as gopls that specialize behavior when a go/packages driver is in use.
The driver is run as a child of the current process, by calling RunIfChild at process start, and running go/packages with the environment variables set by Env.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Env ¶
Env returns additional environment variables for use in packages.Config to enable the use of drivertest as the driver.
t abstracts a *testing.T or log.Default().
func RunIfChild ¶
func RunIfChild()
RunIfChild runs the current process as a go/packages driver, if configured to do so by the current environment (see Env).
Otherwise, RunIfChild is a no op.
Types ¶
This section is empty.