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

Interface AnyValuer

patcher/value/value.go:35–37  ·  view source on GitHub ↗

A AnyValuer provides a generic function for a custom type to return standard go values. It allows for returning a `nil` value but does not provide any type checking at expression compile. A custom type may implement both AnyValuer and a type specific interface to enable both compile time checking a

Source from the content-addressed store, hash-verified

33// A custom type may implement both AnyValuer and a type specific interface to enable both
34// compile time checking and the ability to return a `nil` value.
35type AnyValuer interface {
36 AsAny() any
37}
38
39type IntValuer interface {
40 AsInt() int

Callers 1

getValueFunction · 0.65

Implementers 5

myIntpatcher/value/value_example_test.go
customIntpatcher/value/value_test.go
customUntypedIntpatcher/value/value_test.go
customStringpatcher/value/value_test.go
customUntypedStringpatcher/value/value_test.go

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…