摘要: package main import ( "fmt" ) func checkType(i interface{}) { switch v := i.(type) { //这里是通过i.(type)来判断是什么类型 下面的case分支匹配到了 则执行相关的分支 case int: fmt.Printf("%v is an i... 阅读全文
posted @ 2018-10-25 21:22 运维面试辅导 阅读(3714) 评论(0) 推荐(0)