优化代码

This commit is contained in:
GoEdgeLab
2022-08-04 11:51:34 +08:00
parent efb60513c7
commit 676b80a6f8
15 changed files with 52 additions and 58 deletions

View File

@@ -11,7 +11,6 @@ import (
"github.com/iwind/TeaGo/actions"
"github.com/iwind/TeaGo/logs"
"github.com/iwind/TeaGo/maps"
"io/ioutil"
"net"
"net/http"
"os"
@@ -68,7 +67,7 @@ func FailPage(action actions.ActionWrapper, err error) {
var issuesHTML = ""
if isLocalAPI {
// 读取本地API节点的issues
issuesData, issuesErr := ioutil.ReadFile(Tea.Root + "/edge-api/logs/issues.log")
issuesData, issuesErr := os.ReadFile(Tea.Root + "/edge-api/logs/issues.log")
if issuesErr == nil {
var issueMaps = []maps.Map{}
issuesErr = json.Unmarshal(issuesData, &issueMaps)