Skip to content

Commit

Permalink
Add generic ptr.To, ptr.Deref, ptr.Equal
Browse files Browse the repository at this point in the history
This simplifies the implementation and adds support for pointers to
enums and arbitrary types.

To allow a complete migration from pointer to ptr, this also moves
AllPtrFieldsNil. The ptr.AllPtrFieldsNil "ptr" repetition is preserved
since the function only looks at pointer fields.

Existing deprecation notices are updated to point to the new
functions, and the pointer package as a whole is deprecated.
Existing test code is preserved as-is to "prove" the correctness of
the migration.

This was mostly written by Aldo Culquicondor; see
#269 for context.

Signed-off-by: Stephen Kitt <skitt@redhat.com>
  • Loading branch information
skitt committed Jun 16, 2023
1 parent 9f67429 commit dc1a5d8
Show file tree
Hide file tree
Showing 5 changed files with 271 additions and 222 deletions.

0 comments on commit dc1a5d8

Please sign in to comment.