Signed-off-by: kevin <kevin@lmve.net>
This commit is contained in:
2025-06-05 11:04:12 +08:00
parent 9b63e88da8
commit 9d3eb0cea9
1675 changed files with 357271 additions and 1 deletions
+24
View File
@@ -0,0 +1,24 @@
package routers
import (
"encoding/json"
"fmt"
"os"
)
var Error_code map[string]interface{}
func init() {
//读取默认配置
fmt.Println("尝试读取错误码文件")
data, err := os.ReadFile("./def_config/error_codes.json")
if err != nil {
fmt.Println("读取错误码文件失败", err)
}
if err := json.Unmarshal(data, &Error_code); err != nil {
fmt.Println("解析错误码文件失败", err)
}
}