Fixed for loop and append

This commit is contained in:
utkarshcmu 2016-10-18 08:47:45 -07:00
parent 10d581dd0a
commit 333a853948

View File

@ -57,11 +57,10 @@ func (e *OpenTsdbExecutor) Execute(ctx context.Context, queries tsdb.QuerySlice,
tsdbQuery.Start = queryContext.TimeRange.GetFromAsMsEpoch()
tsdbQuery.End = queryContext.TimeRange.GetToAsMsEpoch()
tsdbQuery.Queries = make([]map[string]interface{}, len(queries))
for i := 0; i < len(queries); i++ {
metric := e.buildMetric(queries[i])
tsdbQuery.Queries[i] = metric
for _ , query := range queries {
metric := e.buildMetric(query)
tsdbQuery.Queries = append(tsdbQuery.Queries, metric)
}
if setting.Env == setting.DEV {