From 4e702eedc9f8b9d4cc87429319860372a633cb6b Mon Sep 17 00:00:00 2001 From: Christian Schwarz Date: Sun, 19 Jul 2020 22:00:01 +0200 Subject: [PATCH] cmd: zfs-abstraction list --json: fix panic (was panicking because `abstractions` is in fact a channel --- client/zfsabstractions_list.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/zfsabstractions_list.go b/client/zfsabstractions_list.go index b8ba646..0b86d7f 100644 --- a/client/zfsabstractions_list.go +++ b/client/zfsabstractions_list.go @@ -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()