From e586dad6d52cad9aa61ccbee88017a726d5a63a2 Mon Sep 17 00:00:00 2001 From: Martin Geno Date: Fri, 20 Jan 2017 13:08:58 +0100 Subject: [PATCH] fix json encoding in meshviewer --- meshviewer/meshviewer.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/meshviewer/meshviewer.go b/meshviewer/meshviewer.go index e2a8723..899b9e3 100644 --- a/meshviewer/meshviewer.go +++ b/meshviewer/meshviewer.go @@ -33,16 +33,16 @@ type Nodes struct { type Statistics struct { NodeId string `json:"node_id"` Clients uint32 `json:"clients"` - RootFsUsage float64 `json:"rootfs_usage,omitempty""` - LoadAverage float64 `json:"loadavg,omitempty""` - Memory data.Memory `json:"memory,omitempty""` - Uptime float64 `json:"uptime,omitempty""` - Idletime float64 `json:"idletime,omitempty""` + RootFsUsage float64 `json:"rootfs_usage,omitempty"` + LoadAverage float64 `json:"loadavg,omitempty"` + Memory data.Memory `json:"memory,omitempty"` + Uptime float64 `json:"uptime,omitempty"` + Idletime float64 `json:"idletime,omitempty"` Gateway string `json:"gateway,omitempty"` Processes struct { Total uint32 `json:"total"` Running uint32 `json:"running"` - } `json:"processes,omitempty""` + } `json:"processes,omitempty"` MeshVpn *data.MeshVPN `json:"mesh_vpn,omitempty"` Traffic struct { Tx *data.Traffic `json:"tx"` @@ -50,5 +50,5 @@ type Statistics struct { Forward *data.Traffic `json:"forward"` MgmtTx *data.Traffic `json:"mgmt_tx"` MgmtRx *data.Traffic `json:"mgmt_rx"` - } `json:"traffic,omitempty""` + } `json:"traffic,omitempty"` }