v2.6.13
English
- Use
sync.OnceinSetLocalemethod oflanguage.goto ensure language files are loaded only once, and usesync.Mapfor thread-safe caching #319 - Add boundary checks for escape character handling in
format2layoutmethod ofhelper.goto preventpaniccaused by out-of-bounds access
中文
- 在
language.go的SetLocale方法中使用sync.Once确保语言文件只加载一次,使用sync.Map进行线程安全的缓存 - 在
helper.go的format2layout方法中为转义字符处理添加边界检查, 防止越界访问导致的panic
Full Changelog: v2.6.12...v2.6.13