摘要: 1.switch switch后带表达式时,switch-case只能模拟相等的情况;如果不带表达式(即 空switch),case后就可以跟任意的条件表达式,例: switch { case add(5) > 10: fmt.Println("right") default: fmt.Printl 阅读全文
posted @ 2023-01-27 16:55 balabalahhh 阅读(19) 评论(0) 推荐(0)