Skip to content

Commit

Permalink
force attribute to json marshell
Browse files Browse the repository at this point in the history
  • Loading branch information
genofire committed Oct 29, 2017
1 parent de41adf commit bd3d1d9
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions output/meshviewer-ffrgb/struct.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ type Node struct {
Hostname string `json:"hostname"`
Location *Location `json:"location,omitempty"`
Firmware Firmware `json:"firmware,omitempty"`
Autoupdater Autoupdater `json:"autoupdater,omitempty"`
Autoupdater Autoupdater `json:"autoupdater"`
Nproc int `json:"nproc"`
Model string `json:"model,omitempty"`
VPN bool `json:"vpn"`
Expand All @@ -49,8 +49,8 @@ type Firmware struct {

// Autoupdater
type Autoupdater struct {
Enabled bool `json:"enabled,omitempty"`
Branch string `json:"branch,omitempty"`
Enabled bool `json:"enabled"`
Branch string `json:"branch"`
}

// Network struct
Expand Down Expand Up @@ -99,7 +99,10 @@ func NewNode(nodes *runtime.Nodes, n *runtime.Node) *Node {
}
}
node.Firmware = nodeinfo.Software.Firmware
node.Autoupdater = nodeinfo.Software.Autoupdater
node.Autoupdater = Autoupdater{
Enabled: nodeinfo.Software.Autoupdater.Enabled,
Branch: nodeinfo.Software.Autoupdater.Branch,
}
node.Nproc = nodeinfo.Hardware.Nproc
node.Model = nodeinfo.Hardware.Model
node.VPN = nodeinfo.VPN
Expand Down

0 comments on commit bd3d1d9

Please sign in to comment.