AsValue converts any given value to a pongo2.Value Usually being used within own functions passed to a template through a Context or within filter functions. Example: AsValue("my string")
(i any)
| 21 | // Example: |
| 22 | // AsValue("my string") |
| 23 | func AsValue(i any) *Value { |
| 24 | return &Value{ |
| 25 | val: reflect.ValueOf(i), |
| 26 | } |
| 27 | } |
| 28 | |
| 29 | // AsSafeValue works like AsValue, but does not apply the 'escape' filter. |
| 30 | func AsSafeValue(i any) *Value { |
no outgoing calls
no test coverage detected
searching dependent graphs…