Browse Source

zones: change toml tags to match yaml and json output

Signed-off-by: Alejandro Mery <amery@jpi.io>
pull/1/head
Alejandro Mery 10 months ago
parent
commit
20484a5061
  1. 4
      pkg/zones/machine.go
  2. 4
      pkg/zones/zones.go

4
pkg/zones/machine.go

@ -10,8 +10,8 @@ import (
// A Machine is a machine on a Zone // A Machine is a machine on a Zone
type Machine struct { type Machine struct {
zone *Zone zone *Zone
ID int ID int `toml:"id"`
Name string `toml:"name" json:"-" yaml:"-"` Name string `toml:"-" json:"-" yaml:"-"`
PublicAddresses []netip.Addr `toml:"public,omitempty" json:"public,omitempty" yaml:"public,omitempty"` PublicAddresses []netip.Addr `toml:"public,omitempty" json:"public,omitempty" yaml:"public,omitempty"`
Rings []*RingInfo `toml:"rings,omitempty" json:"rings,omitempty" yaml:"rings,omitempty"` Rings []*RingInfo `toml:"rings,omitempty" json:"rings,omitempty" yaml:"rings,omitempty"`

4
pkg/zones/zones.go

@ -14,8 +14,8 @@ import (
type Zone struct { type Zone struct {
zones *Zones zones *Zones
ID int ID int `toml:"id"`
Name string Name string `toml:"name"`
Machines []*Machine `toml:"machines"` Machines []*Machine `toml:"machines"`
} }

Loading…
Cancel
Save