Skip to content

Commit

Permalink
Fix error formatter in types for metric.Type
Browse files Browse the repository at this point in the history
metric.Type is int, so should use %d instead of %s. Otherwise, nogo check will throw an error.
  • Loading branch information
Padorax committed Nov 11, 2021
1 parent b65821f commit 02fa49d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ginmetrics/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ func (m *Monitor) AddMetric(metric *Metric) error {
m.metrics[metric.Name] = metric
}
}
return errors.Errorf("metric type '%s' not existed.", metric.Type)
return errors.Errorf("metric type '%d' not existed.", metric.Type)
}

func counterHandler(metric *Metric) error {
Expand Down

0 comments on commit 02fa49d

Please sign in to comment.