Tag: 多态

Golang 接口与多态

Jackey Golang 3,000 次浏览 , ,
package main import ( "fmt" ) type A interface { Get() } type B struct { } func (b *B) Get () { fmt.Println("b") } type C struct { } func (c *C) Get () { fmt.Println("c") } f...
Go