Simplification

This commit is contained in:
Holger Obermaier 2022-02-15 13:51:46 +01:00
parent 2f0e229936
commit d6154ff35b

View File

@ -246,15 +246,16 @@ func (c *metricAggregator) AddAggregation(name, function, condition string, tags
return nil return nil
} }
} }
var agg MetricAggregatorIntervalConfig agg := &MetricAggregatorIntervalConfig{
agg.Name = name Name: name,
agg.Condition = newcond Condition: newcond,
agg.gvalCond = gvalCond gvalCond: gvalCond,
agg.Function = newfunc Function: newfunc,
agg.gvalFunc = gvalFunc gvalFunc: gvalFunc,
agg.Tags = tags Tags: tags,
agg.Meta = meta Meta: meta,
c.functions = append(c.functions, &agg) }
c.functions = append(c.functions, agg)
return nil return nil
} }