Iodine should indent with EmitJSON()

This commit is contained in:
Harshavardhana 2015-07-15 19:04:53 -07:00
parent a23a61da11
commit 2e8f154f34
2 changed files with 5 additions and 2 deletions

View file

@ -85,6 +85,9 @@ func getServerConfig(c *cli.Context) api.Config {
}
func runServer(c *cli.Context) {
if c.Args().Present() {
cli.ShowCommandHelpAndExit(c, "server", 1)
}
_, err := user.Current()
if err != nil {
Fatalf("Unable to determine current user. Reason: %s\n", err)

View file

@ -1,5 +1,5 @@
/*
* Iodine, (C) 2015 Minio, Inc.
* Minimalist Object Storage, (C) 2015 Minio, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -202,7 +202,7 @@ func getSystemData() map[string]string {
// EmitJSON writes JSON output for the error
func (err Error) EmitJSON() ([]byte, error) {
return json.Marshal(err)
return json.MarshalIndent(err, "", "\t")
}
// EmitHumanReadable returns a human readable error message