8000 GitHub - wacul/ptr: Utility functions to handle pointers of built-in types for golang
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

wacul/ptr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ptr

Package 'ptr' provides utility functions to get the pointer of the built-in type.

Codeship

Why?

text := returnsString()
takesStringPtr(&text)

text = returnsString()
str := struct {
  text *string
} {
  text: &text,
}

takesStringPtr(ptr.String(returnsString()))

str := struct {
  text *string
} {
  text: ptr.String(returnsString()),
}

It's so trivial, but that is I want.

License

MIT License

This is distributed under the MIT License.

About

Utility functions to handle pointers of built-in types for golang

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages

0