title: Is it possible to store a Type in a map and use it later to instantiate an object in Go lang?
body: <p>I am new to Go and I have this problem. I need to make a kind of "dispatcher" that will receive a string and return a type to be instantiated based on the string. For example:</p>
  
  <pre><code>AnimalType := mymap["animal"]
  newAnimal := new(AnimalType)
  </code></pre>
  
  <p>Is there a way to do so?</p>
  
  <p>Thanks in advance.</p>