// Parse parses the provided machines io.Reader.
Parse parses the provided machines io.Reader.
// Parse parses the provided machines io . Reader .
func Parse(r io.Reader) ([]*clusterv1.Machine, error) {
	bytes, err := ioutil.ReadAll(r)
	if err != nil {
		return nil, err
	}
	list := &clusterv1.MachineList{}
	err = yaml.Unmarshal(bytes, &list)
	if err != nil {
		return nil, err
	}
	if list == nil {
		return []*clusterv1.Machine{}, nil
	}
	return clusterutil.MachineP(list.Items), nil
}
func Parse ( r io . Reader ) ( [ ] * clusterv1 . Machine , error ) { bytes , err := ioutil . ReadAll ( r ) if err != nil { return nil , err } list := & clusterv1 . MachineList { } err = yaml . Unmarshal ( bytes , & list ) if err != nil { return nil , err } if list == nil { return [ ] * clusterv1 . Machine { } , nil } return clusterutil . MachineP ( list . Items ) , nil }
Parse parses the provided machines io.Reader.
Parse parses the provided machines io . Reader .