From: Cuong Manh Le Date: Wed, 3 Apr 2024 04:24:36 +0000 (+0700) Subject: reflect: add missing String case in Value.UnsafePointer doc X-Git-Tag: go1.23rc1~699 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=23fc9170604a3df9a0458849ffb16b570eadcc19;p=gostls13.git 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 Reviewed-by: Dmitri Shuralyov Auto-Submit: Cuong Manh Le Reviewed-by: Ian Lance Taylor --- diff --git a/src/reflect/value.go b/src/reflect/value.go index d14e01ae0c..3720d63e57 100644 --- a/src/reflect/value.go +++ b/src/reflect/value.go @@ -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