Discover Packages
github.com/aid297/aid/v2
points
package
Version:
v2.9.2
Opens a new window with list of versions in this module.
Published: Jul 3, 2026
License: Apache-2.0
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.
README
README
¶
便捷指针
package main
import (
. `fmt`
"github.com/aid297/aid/v2/ptr"
)
func main() {
a := ptr.New(123)
Printf("%#v\n", a)
b := ptr.New("张三")
Printf("%#v\n", b)
c := ptr.New('a')
Printf("%#v\n", c)
}
Expand ▾
Collapse ▴
Documentation
¶
func Default[T any ](val *T, def T) T
func DefaultNil[T any ](val *T, def T) T
func New[T any ](val T) *T
func Value[T any ](val *T) T
Source Files
¶
Click to show internal directories.
Click to hide internal directories.