title: How to run go test on all test files in my project except for vendor packages
body: <p>My project folder contains:</p>
  
  <pre><code>Makefile  README.md  component/  driver/  service/  vendor/  worker/
  </code></pre>
  
  <p>I'd like to run <code>go test</code> on all test files, e.g. <code>foobar_test.go</code> files except for the test files in the vendor package. The closest I've come to success was with <code>go test ./...</code> but that included vendor test files.</p>
  
  <p>I saw in the documentation you can pass a regex to <code>-run</code> option but I'm having trouble getting this working. For example I tried <code>go test ./*</code>, but I get a bunch of <code>can't load package errors</code>.</p>
  
  <p>What's the best way to do this?</p>