ptr

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2023 License: MIT Imports: 0 Imported by: 0

README

goptr

Go Reference Go Report Card MIT License

provides utilities for converting between value and pointer.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Pointer

func Pointer[T any](v T) (p *T)

func PointerMap

func PointerMap[K comparable, V any](vm map[K]V) (pm map[K]*V)

func PointerSlice

func PointerSlice[E any](vs []E) (ps []*E)

func ToValue

func ToValue[T any](p *T) (v T)

func ToValueMap

func ToValueMap[K comparable, V any](pm map[K]*V) (vm map[K]V)

func ToValueSlice

func ToValueSlice[E any](ps []*E) (vs []E)

Types

This section is empty.

Jump to

Keyboard shortcuts

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