ptr

Package ptr provides Of, to turn literals into pointers.

package ptr

import "go.abhg.dev/doc2go/internal/ptr"

Package ptr provides Of, to turn literals into pointers.

Index

Functions

func Of

func Of[T any](v T) *T

Of returns a pointer to a value of the given type. This is a convenience function to turn literals into pointers.