title: How do you make -tags netgo the default for go?
body: <p>To compile my golang package so that it produces a statically linked executable, I must say:</p>
  
  <pre><code>go install -tags netgo
  </code></pre>
  
  <p>Additionally I now realise that on a system without gcc, I must:</p>
  
  <pre><code>go get -tags netgo github.com/mypackage/...
  go test -tags netgo ./...
  </code></pre>
  
  <p>If you're typing this all the time it's no so nice. I have aliases set up so I can type less, but is there a "nicer" or "proper" way to set -tags netgo as some kind of default? Ideally as part of my package itself, so a stranger trying to work with my package doesn't miss the -tags netgo.</p>
  
  <p>Edit: I also want the possibility to say:</p>
  
  <pre><code>go install -tags netgo -ldflags '-linkmode external -extldflags -static -w'
  </code></pre>
  
  <p>Ie. link to C code that can be statically compiled. So it working on a machine without GCC is less important to me than it producing a statically linked executable. I just wonder if there's a way to do the latter without saying -tags netgo all the time.</p>