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

Function ExampleAsFloat64_error

expr_test.go:359–365  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

357}
358
359func ExampleAsFloat64_error() {
360 _, err := expr.Compile(`!!true`, expr.AsFloat64())
361
362 fmt.Printf("%v", err)
363
364 // Output: expected float64, but got bool
365}
366
367func ExampleWarnOnAny() {
368 // Arrays always have []any type. The expression return type is any.

Callers

nothing calls this directly

Calls 3

CompileFunction · 0.92
AsFloat64Function · 0.92
PrintfMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…