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
Types ¶
This section is empty.