Skip to content

Commit 936a8f6

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, but the remaining pointer functions aren't deprecated (yet) to avoid having a large amount of imposed changes in downstream projects where linting forbids deprecated functions. 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 936a8f6

File tree

5 files changed

+266
-222
lines changed

5 files changed

+266
-222
lines changed

0 commit comments

Comments
 (0)