MCPcopy Create free account
hub / github.com/prometheus/common / String

Method String

model/metric.go:82–93  ·  view source on GitHub ↗

String returns the string representation of s.

()

Source from the content-addressed store, hash-verified

80
81// String returns the string representation of s.
82func (s ValidationScheme) String() string {
83 switch s {
84 case UnsetValidation:
85 return "unset"
86 case LegacyValidation:
87 return "legacy"
88 case UTF8Validation:
89 return "utf8"
90 default:
91 panic(fmt.Errorf("unhandled ValidationScheme: %d", s))
92 }
93}
94
95// MarshalYAML implements the yaml.Marshaler interface.
96func (s ValidationScheme) MarshalYAML() (any, error) {

Callers 3

MarshalYAMLMethod · 0.95
MarshalJSONMethod · 0.95
IsValidMetricNameMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected