Skip to content

Commit

Permalink
Defaults to pretty JSON in dev mode.
Browse files Browse the repository at this point in the history
  • Loading branch information
slackpad committed Nov 18, 2016
1 parent dabb08d commit fa680bd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion command/agent/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ func (s *HTTPServer) wrap(handler func(resp http.ResponseWriter, req *http.Reque
// marshalJSON marshals the object into JSON, respecting the user's pretty-ness
// configuration.
func (s *HTTPServer) marshalJSON(req *http.Request, obj interface{}) ([]byte, error) {
if _, ok := req.URL.Query()["pretty"]; ok {
if _, ok := req.URL.Query()["pretty"]; ok || s.agent.config.DevMode {
buf, err := json.MarshalIndent(obj, "", " ")
if err != nil {
return nil, err
Expand Down

0 comments on commit fa680bd

Please sign in to comment.