aboutsummaryrefslogtreecommitdiff
path: root/src/reflect/value.go
diff options
context:
space:
mode:
authorCuong Manh Le <cuong.manhle.vn@gmail.com>2021-10-28 00:33:19 +0700
committerCuong Manh Le <cuong.manhle.vn@gmail.com>2021-10-28 02:35:22 +0000
commit056dfe6ff34fd479ec5c86d9b26a03c639b3f3f7 (patch)
treeb695ba0068f05679776c5c9055eae96a65b1e508 /src/reflect/value.go
parentb2fe2ebab6e66a453a0137e37d2c639a613a852b (diff)
downloadgo-056dfe6ff34fd479ec5c86d9b26a03c639b3f3f7.tar.gz
go-056dfe6ff34fd479ec5c86d9b26a03c639b3f3f7.zip
reflect: undeprecate Value.{Pointer,UnsafeAddr}
Fixes #49187 Change-Id: I4d8c87af8a709f1b909dd4fae3734d422eb36900 Reviewed-on: https://go-review.googlesource.com/c/go/+/359194 Trust: Cuong Manh Le <cuong.manhle.vn@gmail.com> Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/reflect/value.go')
-rw-r--r--src/reflect/value.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/reflect/value.go b/src/reflect/value.go
index 5d9964eb9d..618d38893e 100644
--- a/src/reflect/value.go
+++ b/src/reflect/value.go
@@ -1934,7 +1934,7 @@ func (v Value) OverflowUint(x uint64) bool {
// element of the slice. If the slice is nil the returned value
// is 0. If the slice is empty but non-nil the return value is non-zero.
//
-// Deprecated: use uintptr(Value.UnsafePointer()) to get the equivalent result.
+// It's preferred to use uintptr(Value.UnsafePointer()) to get the equivalent result.
func (v Value) Pointer() uintptr {
k := v.kind()
switch k {
@@ -2479,7 +2479,7 @@ func (v Value) Uint() uint64 {
// It is for advanced clients that also import the "unsafe" package.
// It panics if v is not addressable.
//
-// Deprecated: use uintptr(Value.Addr().UnsafePointer()) to get the equivalent result.
+// It's preferred to use uintptr(Value.Addr().UnsafePointer()) to get the equivalent result.
func (v Value) UnsafeAddr() uintptr {
if v.typ == nil {
panic(&ValueError{"reflect.Value.UnsafeAddr", Invalid})