正在显示
1 个修改的文件
包含
2 行增加
和
0 行删除
| @@ -48,6 +48,8 @@ func NewIndex(client *elastic.Client, indexFormat string, loc *time.Location) *I | @@ -48,6 +48,8 @@ func NewIndex(client *elastic.Client, indexFormat string, loc *time.Location) *I | ||
| 48 | for _, attr := range attrs { | 48 | for _, attr := range attrs { |
| 49 | if val, ok := m[attr]; ok { | 49 | if val, ok := m[attr]; ok { |
| 50 | vals = append(vals, val) | 50 | vals = append(vals, val) |
| 51 | + } else { | ||
| 52 | + vals = append(vals, "") | ||
| 51 | } | 53 | } |
| 52 | } | 54 | } |
| 53 | return getTime(m).In(loc).Format(fmt.Sprintf(format, vals...)) | 55 | return getTime(m).In(loc).Format(fmt.Sprintf(format, vals...)) |
-
请 注册 或 登录 后发表评论