Source File
castable.go
Belonging Package
github.com/goccy/go-json/internal/runtime
package runtimeimport// CastableTo reports whether a value of the type from is given to a function of WithMarshalers or WithUnmarshalers// of encoding/json/v2 whose argument is of the type to: as itself, as its address if to is the pointer to it, or as// its address in an interface value if its pointer type implements to.func (, reflect.Type) bool {switch .Kind() {case reflect.Interface:return reflect.PointerTo().Implements()case reflect.Pointer:return reflect.PointerTo() ==default:return ==}}
![]() |
The pages are generated with Golds v0.8.7. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |