Debian Codegraph @

sdk/metric/instrumentkind_string.go

raw
1 // Code generated by "stringer -type=InstrumentKind -trimprefix=InstrumentKind"; DO NOT EDIT.
2
3 package metric
4
5 import "strconv"
6
7 func _() {
8 // An "invalid array index" compiler error signifies that the constant values have changed.
9 // Re-run the stringer command to generate them again.
10 var x [1]struct{}
11 _ = x[instrumentKindUndefined-0]
12 _ = x[InstrumentKindCounter-1]
13 _ = x[InstrumentKindUpDownCounter-2]
14 _ = x[InstrumentKindHistogram-3]
15 _ = x[InstrumentKindObservableCounter-4]
16 _ = x[InstrumentKindObservableUpDownCounter-5]
17 _ = x[InstrumentKindObservableGauge-6]
18 _ = x[InstrumentKindGauge-7]
19 }
20
21 const _InstrumentKind_name = "instrumentKindUndefinedCounterUpDownCounterHistogramObservableCounterObservableUpDownCounterObservableGaugeGauge"
22
23 var _InstrumentKind_index = [...]uint8{0, 23, 30, 43, 52, 69, 92, 107, 112}
24
25 func (i InstrumentKind) String() string {
26 idx := int(i) - 0
27 if i < 0 || idx >= len(_InstrumentKind_index)-1 {
28 return "InstrumentKind(" + strconv.FormatInt(int64(i), 10) + ")"
29 }
30 return _InstrumentKind_name[_InstrumentKind_index[idx]:_InstrumentKind_index[idx+1]]
31 }