()
| 71 | } |
| 72 | |
| 73 | func 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 | |
| 86 | func TestDisableIfOperator_AllowsIfFunction(t *testing.T) { |
| 87 | env := map[string]any{ |