网站首页 返回列表 “慢生活”不是懒惰,放慢速度不是拖延时间,而是让我们在生活中寻找到平衡。

go语言的类型assertion和类型switch
首先首先类型assertion和类型switch只能作用于interface{},不能是其他类型。__funcmain(){varvstring="hello"//varvinterface{}=“hello"s,ok:=v.(string)fmt.Println("s=",s,",ok=",ok)switchv.(t...
阅读全文
最新文章
-
2021-02-03
-
2020-06-28
-
2020-06-10
-
2020-06-10
-
2020-06-10
点击排行
-
2020-06-10 7095
-
2018-09-06 6534
-
2020-06-10 6160
-
2020-04-10 6144
-
2020-06-10 6035