code: func (v *Volumes) UnmarshalYAML(unmarshal func(interface{}) error) error {
  	var sliceType []interface{}
  	if err := unmarshal(&sliceType); err == nil {
  		v.Volumes = []*Volume{}
  		for _, volume := range sliceType {
  			name, ok := volume.(string)
  			if !ok {
  				return fmt.Errorf("Cannot unmarshal '%v' to type %T into a string value", name, name)
  			}
  			elts := strings.SplitN(name, ":", 3)
  			var vol *Volume
  			switch {
  			case len(elts) == 1:
  				vol = &Volume{
  					Destination: elts[0],
  				}
  			case len(elts) == 2:
  				vol = &Volume{
  					Source:      elts[0],
  					Destination: elts[1],
  				}
  			case len(elts) == 3:
  				vol = &Volume{
  					Source:      elts[0],
  					Destination: elts[1],
  					AccessMode:  elts[2],
  				}
  			default:
  				// FIXME
  				return fmt.Errorf("")
  			}
  			v.Volumes = append(v.Volumes, vol)
  		}
  		return nil
  	}
  
  	return errors.New("Failed to unmarshal Volumes")
  }
docs: // UnmarshalYAML implements the Unmarshaller interface.