go接口及嵌入类型例子

书上看的。慢慢领会。。 package main import ( "fmt" ) type notifier interface { notify() } type user struct { name string email string } func (u *user) notify() { fmt.Printf("Sending user email to %s<%s
相关文章
相关标签/搜索