ptr
package v0.27.3
Go to latest Published: Aug 1, 2023 License:AGPL-3.0
Opens a new window with list of versions in this module.
Latest LatestThis package is not in the latest version of its module.
Opens a new window with license information.
Imports:1 Opens a new window with list of imports.
Imported by:0 Opens a new window with list of known importers.
Details
Validgo.mod file
The Go module system was introduced in Go 1.11 and is the official dependency management solution for Go.
Redistributable license
Redistributable licenses place minimal restrictions on how software can be used, modified, and redistributed.
Tagged version
Modules with tagged versions give importers more predictable builds.
Stable version
When a project reaches major version v1 it is considered stable.
- Learn more about best practices
Repository
Links
Documentation¶
Overview¶
Package ptr contains some utility methods related to pointers.
Index¶
Constants¶
This section is empty.
Variables¶
This section is empty.
Functions¶
funcNilOrEmpty¶
NilOrEmpty returns true if s is nil or the empty string.
funcNilToDefault¶added inv0.23.1
func NilToDefault[Tany](s *T, def T) T
NilToDefault coalesces a nil value to the provided default value.
funcNilToEmpty¶added inv0.7.2
func NilToEmpty[Tany](s *T) T
NilToEmpty coalesces a nil value to the empty value.
Types¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.