作者 kevin

avoid missing args in formatting

@@ -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...))