utils

package
v3.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2025 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyIfNotNil

func CopyIfNotNil[T any](dst, src *T)

CopyIfNotNil copies the value of src to dst if src is not nil.

func SetDefaultIfNil

func SetDefaultIfNil[T any](dst **T, src *T)

SetDefaultIfNil sets *dst to src if *dst is nil.

func Ternary

func Ternary[T any](condition bool, a, b T) T

Ternary returns a if condition is true, otherwise b.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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