title: Unmarshal YAML into unknown struct
body: <p>Sorry for the confusing title, I'm having trouble wording this question. So lets say I have a YAML config file like this</p>
  
  <pre><code>animals:
    -
      type: whale
      options:
        color: blue
        name: Mr. Whale
      features:
         -
           type: musician
           options:
             instruments:
               - Guitar
               - Violin
  </code></pre>
  
  <p>Very contrived example, but it's directly analogous to what I'm really working with.</p>
  
  <p>So now I have some structs to marshal this config into</p>
  
  <pre><code>type Config struct {
    AnimalConfigs []*AnimalConfig `yaml:"animals"`
  }
  
  type AnimalConfig struct{
    Type string
    Options map[string]string // ????
    Features []*FeatureConfig
  }
  
  type FeatureConfig struct{
    Type string
    Options ????
  }
  </code></pre>
  
  <p>So the problem here is that the animal types (whale, etc..), and features (musician, etc...) are not determined ahead of time, they can be added on as separate modules and can each have their own configurations. So say someone is using this library and wants to add their own animal. I do not know what this animal is, what it's options will be, and what it's features will be. I also don't know the structure of the feature's. All I know is that it will have a <code>type</code> property, and an <code>options</code> property. I would like the developer to be able to add custom animals and features, and my library can just do something like <code>YourAnimal.Create(yourConfig)</code>. </p>
  
  <p>I'm using the go-yaml library. As you can see in the AnimalConfig struct, my initial idea was to have the <code>options</code> and <code>features</code> just be <code>map[string]string</code>, and then let the custom module unmarshal that string into their own struct, but that wouldn't work for example with the <code>musician</code> feature because <code>instruments</code> is a list, not a string. Thanks!</p>