File: instrumentkind_string.go

package info (click to toggle)
golang-opentelemetry-otel 1.31.0-5
  • links: PTS, VCS
  • area: main
  • in suites: experimental, forky, sid
  • size: 11,844 kB
  • sloc: makefile: 237; sh: 51
file content (30 lines) | stat: -rw-r--r-- 1,083 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// Code generated by "stringer -type=InstrumentKind -trimprefix=InstrumentKind"; DO NOT EDIT.

package metric

import "strconv"

func _() {
	// An "invalid array index" compiler error signifies that the constant values have changed.
	// Re-run the stringer command to generate them again.
	var x [1]struct{}
	_ = x[instrumentKindUndefined-0]
	_ = x[InstrumentKindCounter-1]
	_ = x[InstrumentKindUpDownCounter-2]
	_ = x[InstrumentKindHistogram-3]
	_ = x[InstrumentKindObservableCounter-4]
	_ = x[InstrumentKindObservableUpDownCounter-5]
	_ = x[InstrumentKindObservableGauge-6]
	_ = x[InstrumentKindGauge-7]
}

const _InstrumentKind_name = "instrumentKindUndefinedCounterUpDownCounterHistogramObservableCounterObservableUpDownCounterObservableGaugeGauge"

var _InstrumentKind_index = [...]uint8{0, 23, 30, 43, 52, 69, 92, 107, 112}

func (i InstrumentKind) String() string {
	if i >= InstrumentKind(len(_InstrumentKind_index)-1) {
		return "InstrumentKind(" + strconv.FormatInt(int64(i), 10) + ")"
	}
	return _InstrumentKind_name[_InstrumentKind_index[i]:_InstrumentKind_index[i+1]]
}