// An application may supply a custom implementation of ParseFile
// to change the effective file contents or the behavior of the parser,
// or to modify the syntax tree. For example, selectively eliminating
// unwanted function bodies can significantly accelerate type checking.
But how to exactly do to avoid parsing function bodies? And how to set the go/types.Config.IgnoreFuncBodies
to false when calling packages.Load() to avoid checking function bodies? I failed to find the option to set it.
The packages.Config.Tests docs says
// If Tests is set, the loader includes not just the packages
// matching a particular pattern but also any related test packages,
// including test-only variants of the package and the test executable.
//
// For example, when using the go command, loading "fmt" with Tests=true
// returns four packages, with IDs "fmt" (the standard package),
// "fmt [fmt.test]" (the package as compiled for the test),
// "fmt_test" (the test functions from source files in package fmt_test),
// and "fmt.test" (the test binary).
What do the "the package as compiled for the test" and "the test binary" mean?