nulltern

package
v0.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2026 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

Package nulltern: Safe tern operation engine to support reference value handling Provides comprehensive tern operations based on nil reference checks Features each combination of reference/function parameters with efficient nil-safe evaluation Supports both direct reference values and function-based reference generation with deferred evaluation

nulltern: 指针值处理的空值安全三元运算引擎 提供基于 nil 指针检查的全面三元运算功能 包含指针/函数参数的所有组合,具有高效的空值安全评估 支持直接指针值和基于函数的指针生成,具有惰性求值特性

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FF

func FF[T any](a func() *T, b func() *T) *T

FF calls a(), returns result if not nil, otherwise calls and returns b() FF 调用 a(),如果结果不为 nil 则返回,否则调用并返回 b()

func FP

func FP[T any](a func() *T, b *T) *T

FP calls a(), returns result if not nil, otherwise returns b FP 调用 a(),如果结果不为 nil 则返回,否则返回 b

func PF

func PF[T any](a *T, b func() *T) *T

PF returns a if not nil, otherwise calls and returns b() PF 如果 a 不为 nil 则返回 a,否则调用并返回 b()

func PP

func PP[T any](a *T, b *T) *T

PP returns a if not nil, otherwise returns b PP 如果 a 不为 nil 则返回 a,否则返回 b

Types

This section is empty.

Jump to

Keyboard shortcuts

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