Recent Posts
【Golang系列】-通过接口实现OCP设计原理
通过接口实现OCP设计原理开闭原则(open-closed-principle)常缩写:OCP,虽然go不是面向对象语言,但是也可以模拟实现,对扩展是开放,对修改是关闭。实例:package mainimport "fmt"//定义一个pet接口有eat和sleep两个方法typ...
2022-03-19
【Golang系列】-接口嵌套
Read More
...
2022-03-19
【Golang系列】-接口和类型的关系
Read More
...
2022-03-19
【Golang系列】-接口值类型接收者和指针类型接收者
Read More
...
2022-03-19
【Golang系列】-接口
Read More
...
2022-03-18
【Golang系列】-方法接收者类型
Read More
...
2022-03-18
【Golang系列】-方法
Read More
...
2022-03-17
【Golang系列】-结构体指针
Read More
...
2022-03-17
【Golang系列】-结构体的初始化
Read More
...
2022-03-17
【Golang系列】-结构体
Read More
...
2022-03-16
Read More