code: func unmarshal(ext string, buf []byte, out interface{}) error {
  	switch ext {
  	case ".json":
  		return json.Unmarshal(buf, out)
  	case ".yaml":
  		return yaml.Unmarshal(buf, out)
  	}
  
  	return fmt.Errorf("unsupported file extension %v", ext)
  }
docs: // unmarshal finds an appropriate unmarshal function for ext
  // (extension of filename) and unmarshals buf to out. out must be a pointer.