Browse Source

zones: fix `jpictl dump` by explicitly omitting Machine.logger and Zone.logger

if they were fields, as in Zones, they would be ignored automatically.
but they aren't

Signed-off-by: Alejandro Mery <amery@jpi.io>
pull/15/head
Alejandro Mery 1 year ago
parent
commit
32046fc1ec
  1. 2
      pkg/zones/machine.go
  2. 2
      pkg/zones/zones.go

2
pkg/zones/machine.go

@ -10,7 +10,7 @@ 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
logger logger `toml:"-" json:"-" yaml:"-"`
ID int `toml:"id"` ID int `toml:"id"`
Name string `toml:"-" json:"-" yaml:"-"` Name string `toml:"-" json:"-" yaml:"-"`

2
pkg/zones/zones.go

@ -88,7 +88,7 @@ func FilterMachines(m MachineIterator, cond func(*Machine) bool) (Machines, int)
// Zone represents one zone in a cluster // Zone represents one zone in a cluster
type Zone struct { type Zone struct {
zones *Zones zones *Zones
logger logger `toml:"-" json:"-" yaml:"-"`
ID int `toml:"id"` ID int `toml:"id"`
Name string `toml:"name"` Name string `toml:"name"`

Loading…
Cancel
Save