MCPcopy
hub / github.com/google/go-jsonnet / index

Method index

value.go:145–151  ·  view source on GitHub ↗
(i *interpreter, index int)

Source from the content-addressed store, hash-verified

143}
144
145func (s *valueStringTree) index(i *interpreter, index int) (value, error) {
146 if 0 <= index && index < s.len {
147 s.flattenToLeft()
148 return s.left.index(i, index)
149 }
150 return nil, i.Error(fmt.Sprintf("Index %d out of bounds, not within [0, %v)", index, s.length()))
151}
152
153func (s *valueStringTree) getRunes() []rune {
154 s.flattenToLeft()

Callers

nothing calls this directly

Calls 4

flattenToLeftMethod · 0.95
lengthMethod · 0.95
indexMethod · 0.65
ErrorMethod · 0.65

Tested by

no test coverage detected