fix golang lint

Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
This commit is contained in:
Ziqi Zhao 2024-08-23 09:32:04 +08:00
parent c7c4a5c347
commit 87eab0aaad
2 changed files with 2 additions and 2 deletions

View file

@ -838,7 +838,7 @@ func (ev *evalCmd) compareResult(result parser.Value) error {
}
// compareNativeHistogram is helper function to compare two native histograms
// which can tolerate some differ in the field of float type, such as Count, Sum
// which can tolerate some differ in the field of float type, such as Count, Sum.
func compareNativeHistogram(exp, cur *histogram.FloatHistogram) bool {
if exp == nil || cur == nil {
return false

View file

@ -25,7 +25,7 @@ var minNormal = math.Float64frombits(0x0010000000000000) // The smallest positiv
// multiplied by epsilon.
func Equal(a, b, epsilon float64) bool {
// StaleNaN is a special value that is used as staleness maker, so
// the two values are equal when both are exactly equals to stale NaN
// the two values are equal when both are exactly equals to stale NaN.
if value.IsStaleNaN(a) || value.IsStaleNaN(b) {
return value.IsStaleNaN(a) && value.IsStaleNaN(b)
}