MCPcopy Create free account
hub / github.com/cel-expr/cel-go / NativeToValue

Method NativeToValue

ext/network.go:330–339  ·  view source on GitHub ↗
(value any)

Source from the content-addressed store, hash-verified

328}
329
330func (a *networkAdapter) NativeToValue(value any) ref.Val {
331 switch v := value.(type) {
332 case netip.Addr:
333 return IP{Addr: v}
334 case netip.Prefix:
335 return CIDR{Prefix: v}
336 }
337 // Delegate to the wrapped adapter (e.g., Protobuf adapter)
338 return a.Adapter.NativeToValue(value)
339}
340
341// --- Implementation Logic ---
342

Callers

nothing calls this directly

Calls 1

NativeToValueMethod · 0.65

Tested by

no test coverage detected