GitHub - gotidy/ptr: Contains functions for simplified creation of pointers from constants of basic types (original) (raw)
Navigation Menu
Appearance settings
- AI CODE CREATION
* GitHub CopilotWrite better code with AI
* GitHub SparkBuild and deploy intelligent apps
* GitHub ModelsManage and compare prompts
* MCP RegistryNewIntegrate external tools - DEVELOPER WORKFLOWS
* ActionsAutomate any workflow
* CodespacesInstant dev environments
* IssuesPlan and track work
* Code ReviewManage code changes - APPLICATION SECURITY
* GitHub Advanced SecurityFind and fix vulnerabilities
* Code securitySecure your code as you build
* Secret protectionStop leaks before they start - EXPLORE
* Why GitHub
* Documentation
* Blog
* Changelog
* Marketplace
- AI CODE CREATION
- BY COMPANY SIZE
* Enterprises
* Small and medium teams
* Startups
* Nonprofits - BY USE CASE
* App Modernization
* DevSecOps
* DevOps
* CI/CD
* View all use cases - BY INDUSTRY
* Healthcare
* Financial services
* Manufacturing
* Government
* View all industries
- BY COMPANY SIZE
- EXPLORE BY TOPIC
* AI
* Software Development
* DevOps
* Security
* View all topics - EXPLORE BY TYPE
* Customer stories
* Events & webinars
* Ebooks & reports
* Business insights
* GitHub Skills - SUPPORT & SERVICES
* Documentation
* Customer support
* Community forum
* Trust center
* Partners
- EXPLORE BY TOPIC
- COMMUNITY
* GitHub SponsorsFund open source developers - PROGRAMS
* Security Lab
* Maintainer Community
* Accelerator
* Archive Program - REPOSITORIES
* Topics
* Trending
* Collections
- COMMUNITY
- Pricing
Provide feedback
We read every piece of feedback, and take your input very seriously.
Include my email address so I can be contacted
Saved searches
Use saved searches to filter your results more quickly
Appearance settings
- Notifications You must be signed in to change notification settings
- Fork3
- Star 28
Contains functions for simplified creation of pointers from constants of basic types
License
28 stars 3 forks Branches Tags Activity
Notifications You must be signed in to change notification settings
Additional navigation options
Folders and files
| Name | Name | Last commit message | Last commit date |
|---|---|---|---|
| Latest commitHistory15 Commits | |||
| .github/workflows | .github/workflows | ||
| .gitignore | .gitignore | ||
| LICENSE | LICENSE | ||
| Makefile | Makefile | ||
| README.md | README.md | ||
| go.mod | go.mod | ||
| ptr.go | ptr.go | ||
| ptr_test.go | ptr_test.go | ||
| to.go | to.go | ||
| to_test.go | to_test.go | ||
| todef.go | todef.go | ||
| todef_test.go | todef_test.go |
Repository files navigation
ptr

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
Topics
go golang golang-library pointers golang-package ptr
Resources
License
Stars
Watchers
Forks
Releases
Packages
No packages published