Skip to content

Commit dc1a5d8

Browse files
committed
Add generic ptr.To, ptr.Deref, ptr.Equal
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 <[email protected]>
1 parent 9f67429 commit dc1a5d8

File tree

5 files changed

+271
-222
lines changed

5 files changed

+271
-222
lines changed

0 commit comments

Comments
 (0)