title: Set nil string pointer to empty string
body: <p>How do I set the referenced value of a string pointer in a type to the empty string?
  Consider this example:</p>
  
  <pre><code>package main
  
  import (
      "fmt"
  )
  
  type Test struct {
      value *string
  }
  
  func main() {
      t := Test{nil}
      if t.value == nil {
          // I want to set the pointer's value to the empty string here
      }
  
      fmt.Println(t.value)
  }
  </code></pre>
  
  <p>I've tried all combinations of the <code>&amp;</code> and <code>*</code> operators to no avail:</p>
  
  <pre><code>t.value = &amp;""
  t.value = *""
  &amp;t.value = ""
  *t.value = ""
  </code></pre>
  
  <p>Obviously some of those are silly, but I didn't see the harm in trying. 
  I also tried using <code>reflect</code> and <code>SetString</code>:</p>
  
  <pre><code>reflect.ValueOf(t.value).SetString("")
  </code></pre>
  
  <p>and this gives a compilation error</p>
  
  <blockquote>
    <p>panic: reflect: reflect.Value.SetString using unaddressable value</p>
  </blockquote>
  
  <p>I'm assuming that's because strings in Go are immutable?</p>