From 402f4a17caa3abc7aab11cf21d61aaf14ed64a09 Mon Sep 17 00:00:00 2001 From: Quentin Perez Date: Fri, 25 Sep 2015 10:34:12 +0200 Subject: [PATCH] Pretty JSON security-groups #192 --- pkg/cli/x_security-groups.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/cli/x_security-groups.go b/pkg/cli/x_security-groups.go index 0a715572c3..66ab783b3b 100644 --- a/pkg/cli/x_security-groups.go +++ b/pkg/cli/x_security-groups.go @@ -60,11 +60,11 @@ var securityGroupsRuleNew string // -rn, --rule-new flag var securityGroupsRuleUpdate string // -ru, --rule-update flag func printRawMode(out io.Writer, data interface{}) error { - js, err := json.Marshal(data) + js, err := json.MarshalIndent(data, "", " ") if err != nil { return fmt.Errorf("Unable to parse the data: %v", err) } - fmt.Fprintf(out, string(js)) + fmt.Fprintf(out, "%s\n", string(js)) return nil }