refactor the profile add

Signed-off-by: jason yang <jasonyangshadow@gmail.com>
This commit is contained in:
jason yang
2023-04-12 10:27:44 +00:00
parent 0ad69ca3ce
commit 0faada6aae
8 changed files with 180 additions and 72 deletions

View File

@@ -14,8 +14,10 @@ import (
"gopkg.in/yaml.v2"
)
var ConfigFile string
var DefaultConfig string
var (
ConfigFile string
DefaultConfig string
)
var cachedDB NodeYaml
@@ -91,7 +93,8 @@ func New() (NodeYaml, error) {
wwlog.Debug("Returning node object")
cachedDB = ret
cachedDB.current = true
return ret, nil
cachedDB.persist = true
return cachedDB, nil
}
/*