No wonder: it calls the zfs(1) tool and parses its output to do its work. Again. and again. and again.
No wonder: it calls the zfs(1) tool and parses its output to do its work. Again. and again. and again.
Thing is, https://github.com/moby/moby/blob/670bc0a46c4ca03b75f1e72f73... is using https://github.com/mistifyio/go-zfs which features code like `out, err := zfsOutput("get", "-H", key, d.Name)` (Source: https://github.com/mistifyio/go-zfs/blob/master/zfs.go#L315) to get a single zfs property.
Somebody chose to use a library as abstraction that looks good but is implemented as a MVP (nothing wrong with that). "In the future, we hope to work directly with libzfs" should have raised an alarm somewhere, though.
Looks like the answer to that is "yes, but be careful as some are kind of dodgy". :/
---
Oh, that library bills itself as "Simple wrappers for ZFS command line tools", rather than as a ZFS interface.
Wonder why the Moby project picked that one then? Maybe a case of "it was the best choice at the time".