Skip to content

Commit 02fa49d

Browse files
committed
Fix error formatter in types for metric.Type
metric.Type is int, so should use %d instead of %s. Otherwise, nogo check will throw an error.
1 parent b65821f commit 02fa49d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ginmetrics/types.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ func (m *Monitor) AddMetric(metric *Metric) error {
113113
m.metrics[metric.Name] = metric
114114
}
115115
}
116-
return errors.Errorf("metric type '%s' not existed.", metric.Type)
116+
return errors.Errorf("metric type '%d' not existed.", metric.Type)
117117
}
118118

119119
func counterHandler(metric *Metric) error {

0 commit comments

Comments
 (0)