MCPcopy Create free account
hub / github.com/goadesign/goa / IsCompatible

Method IsCompatible

expr/types.go:641–648  ·  view source on GitHub ↗

IsCompatible returns true if u describes the (Go) type of val.

(val any)

Source from the content-addressed store, hash-verified

639
640// IsCompatible returns true if u describes the (Go) type of val.
641func (u *Union) IsCompatible(val any) bool {
642 for _, nat := range u.Values {
643 if nat.Attribute.Type.IsCompatible(val) {
644 return true
645 }
646 }
647 return false
648}
649
650// Example returns a random example value.
651func (u *Union) Example(r *ExampleGenerator) any {

Callers

nothing calls this directly

Calls 1

IsCompatibleMethod · 0.65

Tested by

no test coverage detected