operation

package
v2.20.2 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2024 License: Apache-2.0 Imports: 0 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Ternary

func Ternary[V any](condition bool, T any, F any) V

Ternary 三元运算:通过值

func TernaryFunc

func TernaryFunc[V any](condition func() bool, T any, F any) V

TernaryFunc 三元运算:通过回调函数

func TernaryFuncAll added in v2.19.6

func TernaryFuncAll[V any](condition func() bool, trueFn func() V, falseFn func() V) V

TernaryFuncAll 三元运算:通过回调函数,返回值也使用回调函数

Types

This section is empty.

Jump to

Keyboard shortcuts

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