Follow up work on docker_log input (#6008)

This commit is contained in:
Daniel Nelson
2019-06-20 11:54:12 -07:00
committed by GitHub
parent 29c3d42e7e
commit a0c739eec7
10 changed files with 752 additions and 577 deletions

View File

@@ -123,6 +123,11 @@ func SortMetrics() cmp.Option {
return cmpopts.SortSlices(lessFunc)
}
// IgnoreTime disables comparison of timestamp.
func IgnoreTime() cmp.Option {
return cmpopts.IgnoreFields(metricDiff{}, "Time")
}
// MetricEqual returns true if the metrics are equal.
func MetricEqual(expected, actual telegraf.Metric) bool {
var lhs, rhs *metricDiff