]> Cypherpunks repositories - gostls13.git/commitdiff
reflect: add missing String case in Value.UnsafePointer doc
authorCuong Manh Le <cuong.manhle.vn@gmail.com>
Wed, 3 Apr 2024 04:24:36 +0000 (11:24 +0700)
committerGopher Robot <gobot@golang.org>
Wed, 3 Apr 2024 22:44:07 +0000 (22:44 +0000)
CL 516596 changes Value.UnsafePointer to handle String case. However,
the method's doc comment is not updated to reflect this change.

Updates #61308

Change-Id: I84e02fd969ae0244184e1a2f05cac4651cdf7bff
Reviewed-on: https://go-review.googlesource.com/c/go/+/575956
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Auto-Submit: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
src/reflect/value.go

index d14e01ae0ce983da95955514a8ca52f13e7567fb..3720d63e57f2f51746dec3effed622825890d7b9 100644 (file)
@@ -2773,7 +2773,7 @@ func (v Value) UnsafeAddr() uintptr {
 }
 
 // UnsafePointer returns v's value as a [unsafe.Pointer].
-// It panics if v's Kind is not [Chan], [Func], [Map], [Pointer], [Slice], or [UnsafePointer].
+// It panics if v's Kind is not [Chan], [Func], [Map], [Pointer], [Slice], [String] or [UnsafePointer].
 //
 // If v's Kind is [Func], the returned pointer is an underlying
 // code pointer, but not necessarily enough to identify a