tui/views/utils.go

9 lines
135 B
Go
Raw Normal View History

2022-04-02 13:01:41 +02:00
package views
func iff[T any](condition bool, trueValue, falseValue T) T {
if condition {
return trueValue
}
return falseValue
}