summaryrefslogtreecommitdiff
path: root/config.go
diff options
context:
space:
mode:
Diffstat (limited to 'config.go')
-rw-r--r--config.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/config.go b/config.go
index 923e35c..4da983d 100644
--- a/config.go
+++ b/config.go
@@ -12,7 +12,7 @@ import (
)
// write to ~/.config/forge/ unless ENV{FORGE_HOME} is set
-func (m *ForgeConfigs) ConfigSave() error {
+func (f *Forge) ConfigSave() error {
if os.Getenv("FORGE_HOME") == "" {
homeDir, _ := os.UserHomeDir()
fullpath := filepath.Join(homeDir, ".config/forge")
@@ -22,7 +22,7 @@ func (m *ForgeConfigs) ConfigSave() error {
if err := backupConfig(); err != nil {
return err
}
- data, err := m.Marshal()
+ data, err := f.Config.Marshal()
if err != nil {
log.Info("proto.Marshal() failed len", len(data), err)
return err
@@ -30,10 +30,10 @@ func (m *ForgeConfigs) ConfigSave() error {
log.Info("proto.Marshal() worked len", len(data))
configWrite("forge.pb", data)
- s := m.FormatTEXT()
+ s := f.Config.FormatTEXT()
configWrite("forge.text", []byte(s))
- s = m.FormatJSON()
+ s = f.Config.FormatJSON()
configWrite("forge.json", []byte(s))
return nil
}