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

Method String

model/labelset.go:132–140  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

130}
131
132func (l LabelSet) String() string {
133 lstrs := make([]string, 0, len(l))
134 for l, v := range l {
135 lstrs = append(lstrs, fmt.Sprintf("%s=%q", l, v))
136 }
137
138 sort.Strings(lstrs)
139 return fmt.Sprintf("{%s}", strings.Join(lstrs, ", "))
140}
141
142// Fingerprint returns the LabelSet's fingerprint.
143func (ls LabelSet) Fingerprint() Fingerprint {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected