Compare commits

...

1 Commits

Author SHA1 Message Date
9d9a6f1c6e v0.0.21 2022-11-19 16:58:18 +01:00

View File

@@ -7,3 +7,11 @@ func FormatBool(v bool, strTrue string, strFalse string) string {
return strFalse
}
}
func Conditional[T any](v bool, resTrue T, resFalse T) T {
if v {
return resTrue
} else {
return resFalse
}
}