1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2025-01-14 02:33:21 +02:00

[chore] Remove unnecessary type declaration in templated transforms (#5906)

The type is fully defined by the switch, no need to be redundant.
This commit is contained in:
Tyler Yahn 2024-10-22 16:06:26 -07:00 committed by GitHub
parent 92ccad7bd9
commit 86a51dc049
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 12 additions and 12 deletions

View File

@ -83,13 +83,13 @@ func metric(m metricdata.Metrics) (*mpb.Metric, error) {
}
switch a := m.Data.(type) {
case metricdata.Gauge[int64]:
out.Data = Gauge[int64](a)
out.Data = Gauge(a)
case metricdata.Gauge[float64]:
out.Data = Gauge[float64](a)
out.Data = Gauge(a)
case metricdata.Sum[int64]:
out.Data, err = Sum[int64](a)
out.Data, err = Sum(a)
case metricdata.Sum[float64]:
out.Data, err = Sum[float64](a)
out.Data, err = Sum(a)
case metricdata.Histogram[int64]:
out.Data, err = Histogram(a)
case metricdata.Histogram[float64]:

View File

@ -83,13 +83,13 @@ func metric(m metricdata.Metrics) (*mpb.Metric, error) {
}
switch a := m.Data.(type) {
case metricdata.Gauge[int64]:
out.Data = Gauge[int64](a)
out.Data = Gauge(a)
case metricdata.Gauge[float64]:
out.Data = Gauge[float64](a)
out.Data = Gauge(a)
case metricdata.Sum[int64]:
out.Data, err = Sum[int64](a)
out.Data, err = Sum(a)
case metricdata.Sum[float64]:
out.Data, err = Sum[float64](a)
out.Data, err = Sum(a)
case metricdata.Histogram[int64]:
out.Data, err = Histogram(a)
case metricdata.Histogram[float64]:

View File

@ -83,13 +83,13 @@ func metric(m metricdata.Metrics) (*mpb.Metric, error) {
}
switch a := m.Data.(type) {
case metricdata.Gauge[int64]:
out.Data = Gauge[int64](a)
out.Data = Gauge(a)
case metricdata.Gauge[float64]:
out.Data = Gauge[float64](a)
out.Data = Gauge(a)
case metricdata.Sum[int64]:
out.Data, err = Sum[int64](a)
out.Data, err = Sum(a)
case metricdata.Sum[float64]:
out.Data, err = Sum[float64](a)
out.Data, err = Sum(a)
case metricdata.Histogram[int64]:
out.Data, err = Histogram(a)
case metricdata.Histogram[float64]: