Skip to content

Commit 1400a10

Browse files
committed
Merge pull request #193 from QuentinPerez/prettyJSON
Pretty JSON security-groups #192
2 parents 7217d5c + 402f4a1 commit 1400a10

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/cli/x_security-groups.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,11 @@ var securityGroupsRuleNew string // -rn, --rule-new flag
6060
var securityGroupsRuleUpdate string // -ru, --rule-update flag
6161

6262
func printRawMode(out io.Writer, data interface{}) error {
63-
js, err := json.Marshal(data)
63+
js, err := json.MarshalIndent(data, "", " ")
6464
if err != nil {
6565
return fmt.Errorf("Unable to parse the data: %v", err)
6666
}
67-
fmt.Fprintf(out, string(js))
67+
fmt.Fprintf(out, "%s\n", string(js))
6868
return nil
6969
}
7070

0 commit comments

Comments
 (0)