package testlog

Import Path
	internal/testlog (on go.dev)

Dependency Relation
	imports 2 packages, and imported by one package

Involved Source Files exit.go Package testlog provides a back-channel communication path between tests and package os, so that cmd/go can see which environment variables and files a test consults.
Package-Level Type Names (only one, which is exported)
/* sort exporteds by: | */
Interface is the interface required of test loggers. The os package will invoke the interface's methods to indicate that it is inspecting the given environment variables or files. Multiple goroutines may call these methods simultaneously. ( T) Chdir(dir string) ( T) Getenv(key string) ( T) Open(file string) ( T) Stat(file string) func Logger() Interface func SetLogger(impl Interface)
Package-Level Functions (total 7, all are exported)
Getenv calls Logger().Getenv, if a logger has been set.
Logger returns the current test logger implementation. It returns nil if there is no logger.
Open calls Logger().Open, if a logger has been set.
PanicOnExit0 reports whether to panic on a call to os.Exit(0). This is in the testlog package because, like other definitions in package testlog, it is a hook between the testing package and the os package. This is used to ensure that an early call to os.Exit(0) does not cause a test to pass.
SetLogger sets the test logger implementation for the current process. It must be called only once, at process startup.
SetPanicOnExit0 sets panicOnExit0 to v.
Stat calls Logger().Stat, if a logger has been set.
Package-Level Variables (total 2, neither is exported)