MCPcopy Create free account
hub / github.com/expr-lang/expr / conditionalNode

Function conditionalNode

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

Source from the content-addressed store, hash-verified

348}
349
350func conditionalNode(depth int) string {
351 return oneOf(list[string]{
352 {fmt.Sprintf("if %v { %v } else { %v }", node(depth-1), node(depth-1), node(depth-1)), 100},
353 {fmt.Sprintf("if %v { %v } else %v", node(depth-1), node(depth-1), node(depth-1)), 100},
354 {fmt.Sprintf("%v ? %v : %v", node(depth-1), node(depth-1), node(depth-1)), 100},
355 {fmt.Sprintf("%v ?: %v", node(depth-1), node(depth-1)), 20},
356 })
357}
358
359func sequenceNode(depth int) string {
360 var items []string

Callers

nothing calls this directly

Calls 3

oneOfFunction · 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…