cmd: zfs-abstraction list --json: fix panic

(was panicking because `abstractions` is in fact a channel
This commit is contained in:
Christian Schwarz 2020-07-19 22:00:01 +02:00
parent 8ff83f2f1a
commit 4e702eedc9

View File

@ -63,7 +63,7 @@ func doZabsList(ctx context.Context, sc *cli.Subcommand, args []string) error {
defer line.Lock().Unlock()
if zabsListFlags.Json {
enc.SetIndent("", " ")
if err := enc.Encode(abstractions); err != nil {
if err := enc.Encode(a); err != nil {
panic(err)
}
fmt.Println()