添加部分函数

This commit is contained in:
Yun
2024-07-10 18:28:53 +08:00
parent 9d844ed7d4
commit f84d5b5d28
3 changed files with 36 additions and 20 deletions
+3 -3
View File
@@ -9,10 +9,10 @@ import (
func main() {
langx.RegisterDir("./lang")
code, msg := langx.GetTrans("zh", "success", map[string]string{})
code, msg := langx.GetTransFormat("zh", "success", map[string]string{})
fmt.Println(code, msg)
code, msg = langx.GetTrans("en", "error", map[string]string{
"msg":"这是失败的原因",
code, msg = langx.GetTransFormat("en", "error", map[string]string{
"msg": "这是失败的原因",
})
fmt.Println(code, msg)
}