https://github.com/twmb/vali
An unsafe use of reflect.Value to sidestep an arbitrary limitation.
https://github.com/twmb/vali
Last synced: about 1 year ago
JSON representation
An unsafe use of reflect.Value to sidestep an arbitrary limitation.
- Host: GitHub
- URL: https://github.com/twmb/vali
- Owner: twmb
- License: mit
- Created: 2017-12-21T06:25:25.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-12-22T00:24:24.000Z (over 8 years ago)
- Last Synced: 2025-02-01T04:13:21.594Z (over 1 year ago)
- Language: Go
- Size: 4.88 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
vali
====
[](https://godoc.org/github.com/twmb/vali)
This package provides a function to unsafely obtain an `interface{}` value from
a `reflect.Value` without panicking. This is useful in scenarios where the
`reflect.Value` was obtained by accessing unexported struct fields.
The package is dependent on some Go internal struct layouts and constants, but
the layouts and constants have not changed in many Go releases.
Full documentation can be found on [`godoc`](https://godoc.org/github.com/twmb/vali).