优化从文件读取

This commit is contained in:
Yun
2024-07-10 17:24:58 +08:00
parent 3e2c5daf3e
commit 9d844ed7d4
7 changed files with 97 additions and 4 deletions
+12
View File
@@ -6,11 +6,23 @@ import (
"github.com/yuninks/langx"
)
const(
Lang string = "s"
)
var MapCode = map[string]int{
Lang:200,
}
func TestLangx(t *testing.T) {
langx.InitLangx(
langx.SetDefaultCode(0),
langx.SetDefaultLanguage("zh"),
)
langx.RegisterCode(map[string]int{
"login_success": 200,
"error": 400,