mirror of
https://github.com/duke-git/lancet.git
synced 2026-02-15 18:22:27 +08:00
refactor: change TernaryOperator signature
This commit is contained in:
@@ -237,7 +237,7 @@ func main() {
|
||||
<b>函数签名:</b>
|
||||
|
||||
```go
|
||||
func TernaryOperator[T any](isTrue bool, trueValue T, falseValue T) T
|
||||
func TernaryOperator[T, U any](isTrue T, ifValue U, elseValue U) U
|
||||
```
|
||||
<b>例子:</b>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user