MCPcopy Create free account
hub / github.com/go-json-experiment/json / assertCastableTo

Function assertCastableTo

arshal_funcs.go:355–378  ·  view source on GitHub ↗

assertCastableTo asserts that "to" is a valid type to be casted to. These are the Go types that type-specific arshalers may operate upon. Let AllTypes be the universal set of all possible Go types. This function generally asserts that: len([from for from in AllTypes if castableTo(from, to)]) > 0

(to reflect.Type, marshal bool)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 4

MarshalFuncFunction · 0.85
MarshalToFuncFunction · 0.85
UnmarshalFuncFunction · 0.85
UnmarshalFromFuncFunction · 0.85

Calls 1

KindMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…