ptr

package
v1.64.58 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 10, 2026 License: Apache-2.0 Imports: 0 Imported by: 0

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)
}

Documentation

Index

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL