diff options
| author | Jeff Carr <[email protected]> | 2024-12-01 18:41:00 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-12-01 18:41:00 -0600 |
| commit | afd0bd642841f4dee9ca29c4913a26319aa28dd9 (patch) | |
| tree | 31d55b1e4b24fb26b2927ae7f1d86364345d90dc /config.go | |
| parent | 5b883de7b99fc15d92646a7c965fdf28f1946343 (diff) | |
switched to autogenpbv0.2.10
Diffstat (limited to 'config.go')
| -rw-r--r-- | config.go | 17 |
1 files changed, 6 insertions, 11 deletions
@@ -25,12 +25,10 @@ func (c *Cluster) ConfigSave() error { // make a new droplets struct var dcopy *Droplets dcopy = new(Droplets) - loop := c.DropletsAll() // get the list of droplets + loop := c.d.All() // get the list of droplets for loop.Scan() { - d := loop.Droplet() - var newd Droplet - newd = *d - dcopy.Droplets = append(dcopy.Droplets, &newd) + d := loop.Next() + dcopy.Droplets = append(dcopy.Droplets, d) } // delete all the Current data so it's not put in the config file for _, drop := range dcopy.Droplets { @@ -184,13 +182,10 @@ func (c *Cluster) configWriteDroplets() error { fmt.Println("open config file :", err) return err } - loop := c.DropletsAll() // get the list of droplets + loop := c.d.All() // get the list of droplets for loop.Scan() { - d := loop.Droplet() - var newd Droplet - newd = *d - newd.Current = nil - text := prototext.Format(&newd) + d := loop.Next() + text := prototext.Format(d) fmt.Fprintln(cfgfile, text) } return nil |
