title: Undefined map element in Golang
body: <p>For some reason I am getting the error below</p>
  
  <pre><code>./execTest.go:24: template.datacenter undefined (type map[string]string has no field or method datacenter)
  ./execTest.go:25: template.datacenter undefined (type map[string]string has no field or method datacenter)
  </code></pre>
  
  <p>Here is my Go code</p>
  
  <pre><code>package main
  
  import (
      "fmt"
  )
  
  var template map[string]string
  
  func main() {
      template := map[string]string{
          "cluster":    "",
          "datacenter": "The_Datacenter",
          "host":       "",
          "password":   "",
          "username":   "",
          "vm_name":    "",
      }
  
      args := []string{
          "--acceptAllEulas",
          "--compress=9",
      }
  
      if template.datacenter != "" {
          args = append(args, fmt.Sprintf("--datacenter=%s", template.datacenter))
      }
  
      fmt.Println(template)
  }
  </code></pre>