utils.go
func parseInodeChanges(lines [][]string) ([]*InodeChange, error) {
	changes := make([]*InodeChange, len(lines))

	for i, line := range lines {
		c, err := parseInodeChange(line)
		if err != nil {
			return nil, fmt.Errorf("Failed to parse line %d of zfs diff: %v, got: '%s'", i, err, line)
		}
		changes[i] = c
	}
	return changes, nil
}
func parseInodeChanges(lines [][]string) ([]*InodeChange, error) {
	changes := make([]*InodeChange, len(lines))

	for i, line := range lines {
		c, err := parseInodeChange(line)
		if err != nil {
			return nil, fmt.Errorf("Failed to parse line %d of zfs diff: %v, got: '%s'", i, err, line)
		}
		changes[i] = c
	}
	return changes, nil
}
func parseInodeChanges ( lines [ ] [ ] string ) ( [ ] * InodeChange , error ) { changes := make ( [ ] * InodeChange , len ( lines ) ) for i , line := range lines { c , err := parseInodeChange ( line ) if err != nil { return nil , fmt . Errorf ( " " , i , err , line ) } changes [ i ] = c } return changes , nil }
// example input
//M       /       /testpool/bar/
//+       F       /testpool/bar/hello.txt
//M       /       /testpool/bar/hello.txt (+1)
//M       /       /testpool/bar/hello-hardlink
example input M / / testpool / bar / + F / testpool / bar / hello . txt M / / testpool / bar / hello . txt ( + 1 ) M / / testpool / bar / hello - hardlink