diff options
| author | Jeff Carr <[email protected]> | 2024-10-26 12:33:13 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-10-26 12:33:13 -0500 |
| commit | a4e6d7a58b90e80f45c0464afcc507635c3a4375 (patch) | |
| tree | 50f3289ea1e8087845d02b56d2721d4bd9762947 /config.go | |
| parent | ef32a06292873c4e8942cef07837a948ff71fa5a (diff) | |
start cleaning junk fields from config files
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'config.go')
| -rw-r--r-- | config.go | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -76,6 +76,9 @@ func (c *Cluster) ConfigLoadOld() error { return errors.New("It's not safe to run ConfigLoad() on a nil cluster") } + // erase or zero fields that shouldn't ever be written to the config file + c.BlankFields() + // load the cluster config file if data, err := loadFile("virtigo.json"); err == nil { if err = protojson.Unmarshal(data, c); err != nil { @@ -134,6 +137,7 @@ func (c *Cluster) ConfigLoad() error { return err } // copy them over. is this needed? does the memory free otherwise? + // also set initial values for _, drop := range d.Droplets { c.Droplets = append(c.Droplets, drop) } |
