Files
crypto-price-bot/internal/utils/opx/ternary.go
2024-10-24 09:53:23 +07:00

11 lines
166 B
Go

package opx
// Ite If-then-else
func Ite[T any](condition bool, trueValue T, falseValue T) T {
if condition {
return trueValue
} else {
return falseValue
}
}