title: Issue with golang flags
body: <p>So recently I ran into a problem with Golang flags and was curious to know if this is as intended, if its a problem or if I'm being a blithering idiot and there is a very simple answer to this.</p>
  
  <p>So using the following code:</p>
  
  <pre><code>func main() {
      test := flag.String("-test", "", "test var")
      flag.Parse()
      if *test != "" {
          fmt.Println(*test)
      }
  }
  </code></pre>
  
  <p>And then run it using the following command <code>./main -test 1</code></p>
  
  <p>You get the following autogenerated error:</p>
  
  <pre><code>flag provided but not defined: -test
  Usage of ./main:
    --test string
          test var
  </code></pre>
  
  <p>The same happens if you then use <code>./main --test 1</code>, you get the same error. The only way I have found around this is to change the flag definition to be  <code>test := flag.String("test", "", "test var")</code> and then run it with <code>./main -test 1</code>.</p>
  
  <p>So my question is why can you not use double hyphens with flags? If you can, where did I go wrong when doing this? </p>