Skip to content

Commit

Permalink
reflect: undeprecate Ptr, PtrTo
Browse files Browse the repository at this point in the history
Fixes #48665

Change-Id: Id838f7508f6e93c4546a2aeefc2db194e647db77
Reviewed-on: https://go-review.googlesource.com/c/go/+/359175
Trust: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
  • Loading branch information
bradfitz committed Oct 28, 2021
1 parent b8f928b commit 2ff1074
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/reflect/type.go
Original file line number Diff line number Diff line change
Expand Up @@ -269,8 +269,6 @@ const (
)

// Ptr is the old name for the Pointer kind.
//
// Deprecated: use the new spelling, Pointer.
const Ptr = Pointer

// tflag is used by an rtype to signal what extra type information is
Expand Down Expand Up @@ -1425,9 +1423,9 @@ func TypeOf(i interface{}) Type {
var ptrMap sync.Map // map[*rtype]*ptrType

// PtrTo returns the pointer type with element t.
// For example, if t represents type Foo, PointerTo(t) represents *Foo.
// For example, if t represents type Foo, PtrTo(t) represents *Foo.
//
// Deprecated: use PointerTo. PtrTo is the old spelling.
// PtrTo is the old spelling of PointerTo.
// The two functions behave identically.
func PtrTo(t Type) Type { return PointerTo(t) }

Expand Down

0 comments on commit 2ff1074

Please sign in to comment.