diff --git a/src/reflect/value.go b/src/reflect/value.go index 6830057d61..917a5a69c9 100644 --- a/src/reflect/value.go +++ b/src/reflect/value.go @@ -2742,6 +2742,8 @@ func (v Value) UnsafePointer() unsafe.Pointer { // Moreover, the Data field is not sufficient to guarantee the data // it references will not be garbage collected, so programs must keep // a separate, correctly typed pointer to the underlying data. +// +// Deprecated: Use unsafe.String or unsafe.StringData instead. type StringHeader struct { Data uintptr Len int @@ -2753,6 +2755,8 @@ type StringHeader struct { // Moreover, the Data field is not sufficient to guarantee the data // it references will not be garbage collected, so programs must keep // a separate, correctly typed pointer to the underlying data. +// +// Deprecated: Use unsafe.Slice or unsafe.SliceData instead. type SliceHeader struct { Data uintptr Len int