types

package
v0.22.1 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Ptr

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

func PtrDateTimeString added in v0.19.4

func PtrDateTimeString(dt *carbon.DateTime) *string

PtrDateTimeString converts a *carbon.DateTime to a formatted *string. Returns nil if dt is nil or is a zero date (0001-01-01 00:00:00), preventing zero-dates stored in the database from leaking into API responses.

func PtrFormat added in v0.19.4

func PtrFormat[T any](v *T, formatter func(T) string) *string

PtrFormat calls formatter on v if v is non-nil, returning a *string. Returns nil if v is nil. The caller controls all formatting logic.

Types

This section is empty.

Jump to

Keyboard shortcuts

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