The packages.Config.ParseFileParseFile docs
(https://godoc.org/golang.org/x/tools/go/packages#Config) says
// 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?
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/golang-nuts/f4116dc3-9c45-4a28-85d9-d4690e5c1eea%40googlegroups.com.