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)```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)