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

Method Get

pkg/traceql/enum_hints.go:107–123  ·  view source on GitHub ↗
(k string, t StaticType, allowUnsafe bool)

Source from the content-addressed store, hash-verified

105}
106
107func (h *Hints) Get(k string, t StaticType, allowUnsafe bool) (v Static, ok bool) {
108 if h == nil {
109 return
110 }
111
112 if isUnsafe(k) && !allowUnsafe {
113 return
114 }
115
116 for _, hh := range h.Hints {
117 if hh.Name == k && hh.Value.Type == t {
118 return hh.Value, true
119 }
120 }
121
122 return
123}
124
125var _ Element = (*Hints)(nil)

Callers 5

GetFloatMethod · 0.95
GetIntMethod · 0.95
GetDurationMethod · 0.95
GetBoolMethod · 0.95
GetStringSliceMethod · 0.95

Calls 1

isUnsafeFunction · 0.85

Tested by

no test coverage detected