ptr

package
v0.0.25 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2025 License: AGPL-3.0 Imports: 0 Imported by: 0

Documentation

Overview

Package ptr provides utility functions for creating pointers to values.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bool

func Bool(b bool) *bool

Bool creates a pointer to the given bool value.

func Float64

func Float64(f float64) *float64

Float64 creates a pointer to the given float64 value.

func Int

func Int(i int) *int

Int creates a pointer to the given int value.

func Int64

func Int64(i int64) *int64

Int64 creates a pointer to the given int64 value.

func String

func String(s string) *string

String creates a pointer to the given string value.

func To

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

To creates a pointer to the given value. This is a generic utility function that works with any type.

Types

This section is empty.

Jump to

Keyboard shortcuts

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