mirror of
https://github.com/shadow1ng/fscan.git
synced 2026-09-25 12:41:53 +08:00
fix: 修复 i18n.Tr vet 报错、Unicode 测试用例,移除过期域名
- 移除 i18n.Tr 中错误的 fmt.Sprintf fallback,消除 go vet 误报 - 修复 match_engine_test Unicode 测试用例与 Latin-1 转换逻辑不匹配 - README 移除过期的 fscan.club 域名 - 添加 .gitattributes 统一换行符为 LF
This commit is contained in:
@@ -83,10 +83,6 @@ func Tr(key string, args ...interface{}) string {
|
||||
TemplateData: data,
|
||||
})
|
||||
if err != nil || msg == "" {
|
||||
// 回退:尝试用fmt.Sprintf格式化key本身
|
||||
if len(args) > 0 {
|
||||
return fmt.Sprintf(key, args...)
|
||||
}
|
||||
return key
|
||||
}
|
||||
return msg
|
||||
|
||||
Reference in New Issue
Block a user