From 20484a5061fcfaf044354eabe018d9ec67a63377 Mon Sep 17 00:00:00 2001 From: Alejandro Mery Date: Fri, 25 Aug 2023 16:46:23 +0000 Subject: [PATCH] zones: change toml tags to match yaml and json output Signed-off-by: Alejandro Mery --- pkg/zones/machine.go | 4 ++-- pkg/zones/zones.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/zones/machine.go b/pkg/zones/machine.go index 05aad1e..4f0c736 100644 --- a/pkg/zones/machine.go +++ b/pkg/zones/machine.go @@ -10,8 +10,8 @@ import ( // A Machine is a machine on a Zone type Machine struct { zone *Zone - ID int - Name string `toml:"name" json:"-" yaml:"-"` + ID int `toml:"id"` + Name string `toml:"-" json:"-" yaml:"-"` PublicAddresses []netip.Addr `toml:"public,omitempty" json:"public,omitempty" yaml:"public,omitempty"` Rings []*RingInfo `toml:"rings,omitempty" json:"rings,omitempty" yaml:"rings,omitempty"` diff --git a/pkg/zones/zones.go b/pkg/zones/zones.go index 92489c4..8fd5af1 100644 --- a/pkg/zones/zones.go +++ b/pkg/zones/zones.go @@ -14,8 +14,8 @@ import ( type Zone struct { zones *Zones - ID int - Name string + ID int `toml:"id"` + Name string `toml:"name"` Machines []*Machine `toml:"machines"` }