From 7f150d54fbaa24a3a9a2abdb6db6fdd6bde26a97 Mon Sep 17 00:00:00 2001 From: yanxuean Date: Thu, 13 Sep 2018 14:52:34 +0800 Subject: [PATCH] crictl inspecti fail to unmarshal Signed-off-by: yanxuean --- cmd/crictl/util.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/crictl/util.go b/cmd/crictl/util.go index d0c98e0f29..0c529a4d35 100644 --- a/cmd/crictl/util.go +++ b/cmd/crictl/util.go @@ -224,7 +224,7 @@ func outputStatusInfo(status string, info map[string]string, format string) erro for _, k := range keys { var res interface{} // We attempt to convert key into JSON if possible else use it directly - if err := json.Unmarshal([]byte(info[k]), res); err != nil { + if err := json.Unmarshal([]byte(info[k]), &res); err != nil { jsonInfo += "\"" + k + "\"" + ":" + "\"" + info[k] + "\"," } else { jsonInfo += "\"" + k + "\"" + ":" + info[k] + ","