Skip to content

Commit

Permalink
crictl inspecti fail to unmarshal
Browse files Browse the repository at this point in the history
Signed-off-by: yanxuean <yan.xuean@zte.com.cn>
  • Loading branch information
yanxuean committed Sep 13, 2018
1 parent 31e2aec commit 7f150d5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/crictl/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -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] + ","
Expand Down

0 comments on commit 7f150d5

Please sign in to comment.