Documentation
¶
Index ¶
- func AsInterface[T any](v reflect.Value) (T, error)
- func CopyAndIndirect(n int, s any) any
- func CountIndirectionsBetweenTypes(t1 reflect.Type, t2 reflect.Type) (int, error)
- func CountIndirectionsBetweenTypesUnsafely(t1 reflect.Type, t2 reflect.Type) int
- func EnsureConcreteValue(v reflect.Value) (reflect.Value, error)
- func FollowPointersToConcreteType(t reflect.Type) (reflect.Type, int)
- func FollowPointersToConcreteValue(v reflect.Value) any
- func GetNilValue(t reflect.Type) (any, error)
- func GetTypeName(t reflect.Type) string
- func Indirect(n int, s any) (any, error)
- func TypeImplementsInterface[T any](t reflect.Type) bool
- type Field
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CopyAndIndirect ¶
func CountIndirectionsBetweenTypes ¶
CountIndirectionsBetweenTypes returns the number of indirections between t1 and t2, where t1 points through some level of indirection to t2
func GetNilValue ¶
GetNilValue returns a nil value for the given type, if the type can be set to nil. Otherwise, it returns an error
func GetTypeName ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.