MCPcopy Index your code
hub / github.com/expr-lang/expr / mapNode

Function mapNode

test/gen/gen.go:329–339  ·  view source on GitHub ↗
(depth int)

Source from the content-addressed store, hash-verified

327}
328
329func mapNode(depth int) string {
330 var items []string
331 for i := 0; i < oneOf(list[int]{
332 {1, 100},
333 {2, 50},
334 {3, 25},
335 }); i++ {
336 items = append(items, fmt.Sprintf("%v: %v", stringNode(depth-1), node(depth-1)))
337 }
338 return fmt.Sprintf("{%v}", strings.Join(items, ", "))
339}
340
341func sliceNode(depth int) string {
342 return oneOf(list[string]{

Callers

nothing calls this directly

Calls 4

oneOfFunction · 0.85
stringNodeFunction · 0.85
nodeFunction · 0.85
SprintfMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…