From 3a6fd20bf3d949a556298560029e5e8d9c866e92 Mon Sep 17 00:00:00 2001 From: Julian Kornberger Date: Thu, 15 Dec 2016 10:43:07 +0100 Subject: [PATCH] Remove indirection of embedded structs in Software --- data/nodeinfo.go | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/data/nodeinfo.go b/data/nodeinfo.go index 5ce1129..0421cf0 100644 --- a/data/nodeinfo.go +++ b/data/nodeinfo.go @@ -42,23 +42,23 @@ type Location struct { } type Software struct { - Autoupdater *struct { - Enabled bool `json:"enabled"` - Branch string `json:"branch"` + Autoupdater struct { + Enabled bool `json:"enabled,omitempty"` + Branch string `json:"branch,omitempty"` } `json:"autoupdater,omitempty"` - BatmanAdv *struct { - Version string `json:"version"` - Compat int `json:"compat"` + BatmanAdv struct { + Version string `json:"version,omitempty"` + Compat int `json:"compat,omitempty"` } `json:"batman-adv,omitempty"` - Fastd *struct { - Enabled bool `json:"enabled"` - Version string `json:"version"` + Fastd struct { + Enabled bool `json:"enabled,omitempty"` + Version string `json:"version,omitempty"` } `json:"fastd,omitempty"` - Firmware *struct { - Base string `json:"base"` - Release string `json:"release"` + Firmware struct { + Base string `json:"base,omitempty"` + Release string `json:"release,omitempty"` } `json:"firmware,omitempty"` - StatusPage *struct { + StatusPage struct { Api int `json:"api"` } `json:"status-page,omitempty"` }