ctr: add ctr snapshot info <key>

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
This commit is contained in:
Akihiro Suda
2017-08-15 06:24:43 +00:00
parent 22df20b35f
commit fef7f3addc
4 changed files with 43 additions and 21 deletions

View File

@@ -417,3 +417,11 @@ func labelArgs(labelStrings []string) map[string]string {
return labels
}
func printAsJSON(x interface{}) {
b, err := json.MarshalIndent(x, "", " ")
if err != nil {
fmt.Fprintf(os.Stderr, "can't marshal %+v as a JSON string: %v\n", x, err)
}
fmt.Println(string(b))
}