1
0
mirror of https://github.com/golang/go synced 2024-11-26 06:38:00 -07:00

runtime/metrics: fix panic message for Float64Histogram

The panic message erroneously refers to float64 values.

Change-Id: I83380f41d6c28a72bc69a94b9bcdf9d42b1503c1
Reviewed-on: https://go-review.googlesource.com/c/go/+/281236
Trust: Michael Knyszek <mknyszek@google.com>
Run-TryBot: Michael Knyszek <mknyszek@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Michael Pratt <mpratt@google.com>
This commit is contained in:
Michael Anthony Knyszek 2021-01-06 18:22:17 +00:00 committed by Michael Knyszek
parent d2131704a6
commit 4c668b25c6

View File

@ -63,7 +63,7 @@ func (v Value) Float64() float64 {
// If v.Kind() != KindFloat64Histogram, this method panics. // If v.Kind() != KindFloat64Histogram, this method panics.
func (v Value) Float64Histogram() *Float64Histogram { func (v Value) Float64Histogram() *Float64Histogram {
if v.kind != KindFloat64Histogram { if v.kind != KindFloat64Histogram {
panic("called Float64 on non-float64 metric value") panic("called Float64Histogram on non-Float64Histogram metric value")
} }
return (*Float64Histogram)(v.pointer) return (*Float64Histogram)(v.pointer)
} }