Created
January 15, 2019 12:38
-
-
Save KScaesar/b89da123a6d519efb970e55f6dae0599 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| type T struct { | |
| } | |
| var p *T | |
| func New() *T { | |
| if p == nil { | |
| p = new(T) | |
| } | |
| return p | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment