Skip to content

Commit 26a179f

Browse files
committed
just delete impossible methods
Signed-off-by: Eugene <[email protected]>
1 parent 879c474 commit 26a179f

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

prometheus/promsafe/safe.go

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -123,23 +123,11 @@ type CounterVec[T LabelsProviderMarker] struct {
123123
inner *prometheus.CounterVec
124124
}
125125

126-
// GetMetricWithLabelValues covers prometheus.CounterVec.GetMetricWithLabelValues
127-
// Deprecated: Use GetMetricWith() instead. We can't provide a []string safe implementation in promsafe
128-
func (c *CounterVec[T]) GetMetricWithLabelValues(_ ...string) (prometheus.Counter, error) {
129-
panic("There can't be a SAFE GetMetricWithLabelValues(). Use GetMetricWith() instead")
130-
}
131-
132126
// GetMetricWith behaves like prometheus.CounterVec.GetMetricWith but with type-safe labels.
133127
func (c *CounterVec[T]) GetMetricWith(labels T) (prometheus.Counter, error) {
134128
return c.inner.GetMetricWith(extractLabelsWithValues(labels))
135129
}
136130

137-
// WithLabelValues covers like prometheus.CounterVec.WithLabelValues.
138-
// Deprecated: Use With() instead. We can't provide a []string safe implementation in promsafe
139-
func (c *CounterVec[T]) WithLabelValues(_ ...string) prometheus.Counter {
140-
panic("There can't be a SAFE WithLabelValues(). Use With() instead")
141-
}
142-
143131
// With behaves like prometheus.CounterVec.With but with type-safe labels.
144132
func (c *CounterVec[T]) With(labels T) prometheus.Counter {
145133
return c.inner.With(extractLabelsWithValues(labels))

0 commit comments

Comments
 (0)