unsafe

package
v1.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 8, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DisableRO

func DisableRO(v *reflect.Value)

DisableRO disables the read-only flag of a reflect.Value object. We use this to allow the reflect package to access the value of an unexported field as if it was exported (so we can copy it).

DANGER! HERE BE DRAGONS! This is brittle and depends on internal state of a reflect.Value object. It is not guaranteed to work in future (or previous) versions of Go although we try to detect changes and panic immediately during initialization.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL