Documentation ¶
Index ¶
Constants ¶
View Source
const ( // UnsafeDisabled is a build-time constant which specifies whether or // not access to the unsafe package is available. UnsafeDisabled = false )
Variables ¶
This section is empty.
Functions ¶
func UnsafeReflectValue ¶
UnsafeReflectValue converts the passed reflect.Value into a one that bypasses the typical safety restrictions preventing access to unaddressable and unexported data. It works by digging the raw pointer to the underlying value out of the protected value and generating a new unprotected (unsafe) reflect.Value to it.
This allows us to check for implementations of the Stringer and error interfaces to be used for pretty printing ordinarily unaddressable and inaccessible values such as unexported struct fields.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.