ptr

package
v0.1.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetIntOrDefault

func GetIntOrDefault(ptr *int, def int) int

func GetSafeDeref

func GetSafeDeref[T any](ptr *T) T

GetSafeDeref returns the dereferenced value of a pointer or the zero value of T if the pointer is nil.

func IsNotNilUUID

func IsNotNilUUID(ptr *uuid.UUID) bool

func IsValidStrPtr

func IsValidStrPtr(s *string) bool

func PanicIfDifferent

func PanicIfDifferent[T any](current, expected T)

PanicIfDifferent - panics if arguments are of different type

func PointTo

func PointTo[T any](t T) *T

PointTo creates a typed pointer of whatever you hand in as parameter

Types

This section is empty.

Jump to

Keyboard shortcuts

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