GitHub - gotidy/ptr: Contains functions for simplified creation of pointers from constants of basic types
-
Notifications
You must be signed in to change notification settings - Fork 3
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Latest commitHistory | ||||
Repository files navigation
ptr contains functions for simplified creation of pointers from constants of basic types.
Support for generics has been implemented since version 1.4.0. Required 1.18 or later version of Go.
Installation
go get github.com/gotidy/ptr
Examples
This code:
p := ptr.Of(10)
is the equivalent for:
i := int(10) p := &i
Documentation
License
About
Contains functions for simplified creation of pointers from constants of basic types