摘要:
#第17章反射 17.1先看一个问题,反射的使用场景 package main import ( "fmt" "encoding/json" ) type Monster struct { Name string `json: "monsterName"` Age int `json:"monste 阅读全文
摘要:
package main import( "fmt" ) //声明|定义一个接口 type Usb interface{ //声明了两个没有实现的方法 start() stop() } type Phone struct {} //让phone 实现Usb接口的方法 func (p Phone) s 阅读全文