优化代码

This commit is contained in:
刘祥超
2022-08-04 11:51:34 +08:00
parent 529b7041e7
commit dad8802fb0
15 changed files with 52 additions and 58 deletions

View File

@@ -6,7 +6,7 @@ import (
"encoding/json"
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils"
"github.com/iwind/TeaGo/Tea"
"io/ioutil"
"os"
)
type HideTipAction struct {
@@ -23,7 +23,7 @@ func (this *HideTipAction) RunPost(params struct {
// 保存到文件
tipJSON, err := json.Marshal(tipKeyMap)
if err == nil {
_ = ioutil.WriteFile(Tea.ConfigFile(tipConfigFile), tipJSON, 0666)
_ = os.WriteFile(Tea.ConfigFile(tipConfigFile), tipJSON, 0666)
}
this.Success()