I'm trying to write code that uses go/types to parse all of
github.com/juju/juju/... and looks for places we create a crypto/tls.Config.
However, my code is tripping up over some test code that uses the export_test.go pattern. Here's the exact way it's failing:
Note that agent_test.go is declared in package agent_test and export_test.go is declared in package agent.
I'm not sure how to resolve this using go/parser and go/types. here's the code I'm running to parse a directory:
Is there a way around this? Any way to tell go/parser or go/types to include _test files when parsing? I didn't immediately see anything, but may well have missed something.
Any help appreciated.
-Nate