ci(drone): 添加 Go 模块和构建缓存

- 在 restore cache 和 rebuild cache 步骤中添加了 go-mod-cache 和 go
This commit is contained in:
hxt
2025-07-17 20:25:50 +08:00
parent 9ef6ac9cdb
commit 0ad79c4f27
75 changed files with 1400 additions and 1745 deletions

View File

@@ -646,7 +646,7 @@ func (l *Logic) LoadFromDB(ctx context.Context) error {
// 重新构建缓存
l.cache = make(map[string]map[string]string)
// 新增同步数据库内容到I18nEnToZh备份
// 新增同步数据库内容到I18nEnToZh和I18nZhToEn备份
for _, m := range mappings {
if l.cache[m.Language] == nil {
l.cache[m.Language] = make(map[string]string)
@@ -654,6 +654,7 @@ func (l *Logic) LoadFromDB(ctx context.Context) error {
l.cache[m.Language][m.KeyName] = m.Value
if m.Language == "zh" {
I18nEnToZh[m.KeyName] = m.Value
I18nZhToEn[m.Value] = m.KeyName // 新增:同步反向映射
}
}