go语言 判断一个实例是否实现了某个接口interface
摘要:
package main import "fmt" type Animal interface { run() walk() } type Dog struct { Id int } func (dog Dog) run() { fmt.Printf("I am Dog,I can Run!\n") 阅读全文
posted @ 2021-10-09 17:53 ExplorerMan 阅读(130) 评论(0) 推荐(0) 编辑