mistifyio/go-zfs

GetProperty("creation") returns incomplete value

StephaneBunel opened this issue · 0 comments

zfs get -H creation disk4T/code

returns: disk4T/code creation mer. mai 4 15:59 2016 -

but

func main() {
	ds, _ := zfs.GetDataset("disk4T/code")
	prop, _ := ds.GetProperty("creation")
	fmt.Printf("%#v\n", prop)
}

returns:

"mer."

This is because in utils.go:Run() use:

for i, l := range lines {
    output[i] = strings.Fields(l)
}

to split fields. But stings.Fields() doesn't make difference between space and tabulation.