title: How to convert a 'string pointer' to a string in Golang?
body: <p>Is it possible to get the string value from a pointer to a string?</p>
  
  <p>I am using the <a href="https://github.com/droundy/goopt" rel="noreferrer">goopt package</a> to handle flag parsing and the package returns *string only. I want to use these values to call a function in a map.</p>
  
  <p><strong><a href="http://play.golang.org/p/1s0-d-GO-L" rel="noreferrer">Example</a></strong></p>
  
  <pre><code>var strPointer = new(string)
  *strPointer = "string"
  
  functions := map[string]func() {
      "string": func(){
          fmt.Println("works")
      },
  }  
  
  //Do something to get the string value
  
  functions[strPointerValue]()
  </code></pre>
  
  <p>returns</p>
  
  <pre><code>./prog.go:17:14: cannot use strPointer (type *string) 
  as type string in map index
  </code></pre>