golang的interface剖析
摘要:背景: golang的interface是一种satisfied式的。A类只要实现了IA interface定义的方法,A就satisfied了接口IA。更抽象一层,如果某些设计上需要一些更抽象的共性,比如print各类型,这时需要使用reflect机制,reflect实质上就是将interface
阅读全文
posted @ 2017-01-19 00:45
posted @ 2017-01-19 00:45
posted @ 2017-01-17 01:26
posted @ 2017-01-10 00:46