Merge pull request #17 from cryptix/prettierPretty

change pretty to compact
This commit is contained in:
Dave Grijalva 2014-05-22 11:54:38 -07:00
commit cdec324455
1 changed files with 5 additions and 5 deletions

View File

@ -22,7 +22,7 @@ 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")
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
@ -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)