reflect: add missing String case in Value.UnsafePointer doc

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>
This commit is contained in:
Cuong Manh Le 2024-04-03 11:24:36 +07:00 committed by Gopher Robot
parent 968e1ce1e4
commit 23fc917060

View file

@ -2773,7 +2773,7 @@ func (v Value) UnsafeAddr() uintptr {
} }
// UnsafePointer returns v's value as a [unsafe.Pointer]. // 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 // If v's Kind is [Func], the returned pointer is an underlying
// code pointer, but not necessarily enough to identify a // code pointer, but not necessarily enough to identify a