func()

in internal/diskutil/decoder.go [27:39]


func (d *PlistDecoder) DecodeSystemPartitions(reader io.ReadSeeker) (*types.SystemPartitions, error) {
	// Set up a new SystemPartitions and create a decoder from the reader
	partitions := &types.SystemPartitions{}
	decoder := plist.NewDecoder(reader)

	// Decode the plist output from diskutil into a SystemPartitions struct for easier access
	err := decoder.Decode(partitions)
	if err != nil {
		return nil, fmt.Errorf("error decoding list: %w", err)
	}

	return partitions, nil
}