SkillAgentSearch skills...

Ptr

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

Install / Use

/learn @wacul/Ptr
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

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.

Related Skills

View on GitHub
GitHub Stars9
CategoryDevelopment
Updated3y ago
Forks6

Languages

Go

Security Score

70/100

Audited on Feb 15, 2023

No findings