bool.go 109 B

12345678
  1. package tox
  2. func TernaryOperation(b bool, t, f interface{}) interface{} {
  3. if b {
  4. return t
  5. }
  6. return f
  7. }