MCPcopy
hub / github.com/expr-lang/expr / ExampleEval_bytes_literal

Function ExampleEval_bytes_literal

expr_test.go:73–84  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

71}
72
73func ExampleEval_bytes_literal() {
74 // Bytes literal returns []byte.
75 output, err := expr.Eval(`b"abc"`, nil)
76 if err != nil {
77 fmt.Printf("%v", err)
78 return
79 }
80
81 fmt.Printf("%v", output)
82
83 // Output: [97 98 99]
84}
85
86func TestDisableIfOperator_AllowsIfFunction(t *testing.T) {
87 env := map[string]any{

Callers

nothing calls this directly

Calls 2

EvalFunction · 0.92
PrintfMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…