Skip to content

Commit 9995916

Browse files
author
Stephen Asbury
committed
changed pretty to compact
1 parent 7290e28 commit 9995916

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

server/core/monitoring.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ func (server *NATSReplicator) HandleRoot(w http.ResponseWriter, r *http.Request)
184184
<body>
185185
<img src="http://nats.io/img/logo.png" alt="NATS">
186186
<br/>
187-
<a href=/varz?pretty=true>varz</a><br/>
187+
<a href=/varz>varz</a><br/>
188188
<a href=/healthz>healthz</a><br/>
189189
<br/>
190190
</body>
@@ -197,17 +197,17 @@ func (server *NATSReplicator) HandleVarz(w http.ResponseWriter, r *http.Request)
197197
server.httpReqStats[VarzPath]++
198198
server.statsLock.Unlock()
199199

200-
pretty := strings.ToLower(r.URL.Query().Get("pretty")) == "true"
200+
compact := strings.ToLower(r.URL.Query().Get("compact")) == "true"
201201

202202
stats := server.stats()
203203

204204
var err error
205205
var varzJSON []byte
206206

207-
if pretty {
208-
varzJSON, err = json.MarshalIndent(stats, "", " ")
209-
} else {
207+
if compact {
210208
varzJSON, err = json.Marshal(stats)
209+
} else {
210+
varzJSON, err = json.MarshalIndent(stats, "", " ")
211211
}
212212

213213
if err != nil {

0 commit comments

Comments
 (0)