operationKit

package
v1.3.11 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2023 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](flag bool, trueRst, falseRst T) T

Ternary 三目运算符(ternary operator)

PS: (1) Golang原生不支持三目运算符,因此只能自己实现. (2) ternary adj.三元的,三重的

参考: golang三目运算的实现 https://www.cnblogs.com/GetcharZp/p/15172602.html

@param rst0 true 条件下的返回值 @param rst1 false条件下的返回值

Types

This section is empty.

Jump to

Keyboard shortcuts

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