update gui

更新ui展示
This commit is contained in:
谢小军
2020-01-21 17:36:22 +08:00
parent b72a40e40e
commit bb224315a1
9 changed files with 106 additions and 5 deletions

View File

@@ -6,7 +6,7 @@ import (
"github.com/xxjwxc/public/dev"
"github.com/xxjwxc/public/tools"
"gopkg.in/yaml.v2"
"gopkg.in/yaml.v3"
)
// CfgBase base config struct
@@ -65,3 +65,16 @@ func GetIsDev() bool {
func SetIsDev(b bool) {
_map.IsDev = b
}
// SaveToFile save config info to file
func SaveToFile() error {
d, err := yaml.Marshal(_map)
if err != nil {
return err
}
tools.WriteFile(tools.GetModelPath()+"/config.yml", []string{
string(d),
}, true)
return nil
}