MCPcopy
hub / github.com/grafana/tempo / arrayToString

Function arrayToString

pkg/traceql/ast_stringer.go:138–154  ·  view source on GitHub ↗
(array []T, quoted bool)

Source from the content-addressed store, hash-verified

136}
137
138func arrayToString[T any](array []T, quoted bool) string {
139 tmpl := "%v"
140 if quoted {
141 tmpl = "`%v`"
142 }
143
144 var s strings.Builder
145 s.WriteByte('[')
146 for i, e := range array {
147 s.WriteString(fmt.Sprintf(tmpl, e))
148 if i < len(array)-1 {
149 s.WriteString(", ")
150 }
151 }
152 s.WriteRune(']')
153 return s.String()
154}
155
156func (a Attribute) String() string {
157 scopes := []string{}

Callers 1

EncodeToStringMethod · 0.85

Calls 1

StringMethod · 0.45

Tested by

no test coverage detected