网站介绍:文章浏览阅读115次。package mainimport "fmt"func sum() int { return 44}func test(x int) int { a := 5 b := 2 return a + b + x}func main() { //todo:示例一 switch后面有一个表达式,case后面有一到多个表达式,前面的case匹配 //到执行了,后面的case即使也匹配但不会执行;switch和case表达式最终的值的类型要一致 n := 44_invalid case 'num1 < 60' in switch on 'num1' (mismatched types 'bool' and 'i
- 链接地址:https://blog.csdn.net/Aa413188ok/article/details/109268477
- 链接标题:10.1 switch.go_invalid case 'num1 < 60' in switch on 'num1' (mism-CSDN博客
- 所属网站:blog.csdn.net
- 被收藏次数:2466
- 网站标签:invalid case 'num1 < 60' in switch on 'num1' (mismatched types 'bool' and 'i