title: flag in test causes other tests to fail to run
body: <p>I have a test file that I want to only run when a bit flag is set. I followed the simple example from <a href="https://golang.org/pkg/testing/#hdr-Main" rel="nofollow noreferrer">golang's testing docs</a>:</p>
  
  <pre><code>package mypkg
  
  var myFlagSet = flag.Bool("myflag", false, "")
  func TestMain(m *testing.M) {
      flag.Parse()
      if *myFlagSet {
          os.Exit(m.Run())
      }
  }
  </code></pre>
  
  <p>if I run <code>go test ./mypkg -myflag</code> it runs as expected. However, when I run <code>go test ./... -myflag</code>, all other package tests fail:</p>
  
  <pre><code>flag provided but not defined: -myflag
  </code></pre>
  
  <p>I want to be able to run all tests and not have to worry about parsing this flag in every test file. Is there a way to do this that I'm missing?</p>