title: Why can't a string be nil in Go?
body: <p>The program <a href="https://play.golang.org/p/2gLydmLeHf" rel="noreferrer">available on The Go Playground</a> reads</p>
  
  <pre><code>package main
  
  import "fmt"
  
  func main() {
      var name string = nil
      fmt.Println(name)
  }
  </code></pre>
  
  <p>and yields an error</p>
  
  <pre><code>prog.go:6: cannot use nil as type string in assignment
  </code></pre>
  
  <p>I understand <a href="https://tour.golang.org/basics/12" rel="noreferrer"><code>""</code> is the "zero value" for strings</a>. I don't understand why I cannot assign <code>nil</code> to my <code>string</code>.</p>