condition

package
v0.1.13 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2025 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Ternary

func Ternary[T any](condition bool, trueVal, falseVal T) T

Ternary 实现类似三元运算符的功能

func TernaryF

func TernaryF[T any](condition bool, trueFunc, falseFunc func() T) T

TernaryF 实现类似三元运算符的功能,但返回的是函数调用的结果

Types

This section is empty.

Jump to

Keyboard shortcuts

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