title: How do I write test in Go that make use of the -short flag and can it be combined with the -benchmark flag?
body: <p>How do I make use of the <code>-short</code> flag given in <code>go test -short</code>? </p>
  
  <p>Is it possible to combine the <code>-short</code> and <code>-benchmark</code> flags? </p>
  
  <p>I am quite new to the Go language but I am trying to adapt myself to some of its common practises.  Part of this is to try and ensure my code has not only Unit Tests added in a way that the <code>go test</code> system works but that <code>go test -benchmark</code> also functions in a useful manner.</p>
  
  <p>At the moment I have a benchmark test that includes a series of sub-tests based on varying sized of input data.  Running the 15 permutations takes a long time, so it would be nice to given an option of shortening that test time.  </p>
  
  <p>The next set of tests I plan to write could include a series of data input examples.  I expect running a single one of these could work as a sanity check for a short test but having the option to run several on longer (or normal) test runs would be good. </p>
  
  <p>When I look at <a href="https://golang.org/cmd/go/#hdr-Testing_flags" rel="nofollow noreferrer">the GoLang documentation for the testing flags</a> it says "Tell long-running tests to shorten their run time." which sounds like what I want, but I cannot work out how to pick up this flag in the test code.</p>