The package xreflect
is a wrapper aroung Go standard packages reflect
and go/types
that emulates the missing features of reflect
package:
- NamedOf: declare new named types at runtime
- AddMethod: add method to a named type at runtime
- InterfaceOf: declare new interfaces at runtime
MPL v2.0+