Match the error messages in testdata/errors/*.go like LLVM FileCheck, which includes regular expressions. I believe this is much more flexible, and LLVM uses it in nearly all of their tests so it must work quite well for compilers.
go list
Instead of exiting with an error, handle these errors internally. This will enable a few improvements in the future.