![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Golang
「已注销」
这个作者很懒,什么都没留下…
展开
-
Golang里面的接口(一)
Interface In Go -Part1原文地址( https://medium.com/golangspec/interfaces-in-go-part-i-4ae53a97479c)使用一些接口,会让你的编码具有更强的灵活性、可扩展性,并且interface是golang用于实现多态(polymorphism)的一种手段。interfaces允许在一些行为被需要的时候才去指定,而不需要...翻译 2019-06-25 09:44:31 · 142 阅读 · 0 评论 -
Golang里面的接口(二)
Interface In Go Part2原文地址(https://medium.com/golangspec/interfaces-in-go-part-ii-d5057ffdb0a6)有一些时候,一些值需要被转换为另一个不同的类型。转换操作是一个编译时受检的操作,并且整个机制在更早的另一篇文章里面有详细说明。简单来说,看起来就好像是这个样子的:type T1 struct { n...翻译 2019-06-25 09:46:27 · 484 阅读 · 0 评论