From c2458a49b5e308a8dc5df4bf1785c272b7c49fb8 Mon Sep 17 00:00:00 2001 From: Henry Date: Wed, 21 May 2014 16:27:23 +0200 Subject: [PATCH] change pretty to compact --- cmd/jwt/app.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cmd/jwt/app.go b/cmd/jwt/app.go index 8ac5cad..18bb214 100644 --- a/cmd/jwt/app.go +++ b/cmd/jwt/app.go @@ -20,10 +20,10 @@ import ( var ( // Options - flagAlg = flag.String("alg", "", "signing algorithm identifier") - flagKey = flag.String("key", "", "path to key file or '-' to read from stdin") - flagPretty = flag.Bool("pretty", true, "output pretty JSON") - flagDebug = flag.Bool("debug", false, "print out all kinds of debug data") + flagAlg = flag.String("alg", "", "signing algorithm identifier") + flagKey = flag.String("key", "", "path to key file or '-' to read from stdin") + flagCompact = flag.Bool("compact", false, "output compact JSON") + flagDebug = flag.Bool("debug", false, "print out all kinds of debug data") // Modes - exactly one of these is required flagSign = flag.String("sign", "", "path to claims object to sign or '-' to read from stdin") @@ -86,7 +86,7 @@ func printJSON(j interface{}) error { var out []byte var err error - if *flagPretty { + if *flagCompact == false { out, err = json.MarshalIndent(j, "", " ") } else { out, err = json.Marshal(j)