summaryrefslogtreecommitdiff
path: root/config.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-10-31 09:19:15 -0500
committerJeff Carr <[email protected]>2024-10-31 09:19:15 -0500
commit08757bc3150953870b2e56ec82bb82027ffbaa7a (patch)
tree26b4d8c4dd63b7c354e9489587f94203c57fb74a /config.go
parentcc0ca1dd7caf5aa93624428a2d254b71e8b09a81 (diff)
code cleanups
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'config.go')
-rw-r--r--config.go14
1 files changed, 1 insertions, 13 deletions
diff --git a/config.go b/config.go
index 2fd4c33..7973da9 100644
--- a/config.go
+++ b/config.go
@@ -8,7 +8,6 @@ import (
"fmt"
"os"
"path/filepath"
- "time"
"google.golang.org/protobuf/encoding/protojson"
"google.golang.org/protobuf/encoding/prototext"
@@ -19,7 +18,7 @@ import (
// to make it humanly possible to hand edit things as needed
func (c *Cluster) ConfigSave() error {
// try to backup the current cluster config files
- if err := backupConfigFiles(); err != nil {
+ if err := backupConfig(); err != nil {
return err
}
@@ -83,17 +82,6 @@ func (c *Cluster) ConfigSave() error {
return nil
}
-func backupConfigFiles() error {
- // make a new dir to backup the files
- now := time.Now()
- // timestamp := now.Format("2022.07.18.190545") // 50yr shout out to K&R
- timestamp := now.Format("2006.01.02.150405") // bummer. other date doesn't work?
- srcDir := filepath.Join(os.Getenv("VIRTIGO_HOME"))
- destDir := filepath.Join(os.Getenv("VIRTIGO_HOME"), timestamp)
-
- return backupFiles(srcDir, destDir)
-}
-
func (c *Cluster) ConfigLoad() error {
if c == nil {
return errors.New("It's not safe to run ConfigLoad() on a nil cluster")