README ¶ 便捷指针 package main import ( . `fmt` "github.com/aid297/aid/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 ¶ Index ¶ func New[T any](val T) *T Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func New ¶ func New[T any](val T) *T Types ¶ This section is empty. Source Files ¶ View all Source files new.go Click to show internal directories. Click to hide internal directories.