golang 三目运算的实现

```golang

// 三目运算的函数
func ternary(a bool, b, c bool) bool {
if a {
return b
}
return c
}
```
 
## 参考
 
[https://www.cnblogs.com/GetcharZp/p/15172602.html](https://www.cnblogs.com/GetcharZp/p/15172602.html)
posted @ 2022-05-24 16:18  jiftle  阅读(393)  评论(0编辑  收藏  举报