标签:type main pre int compile class ace str static
package main import "fmt" type animal interface { Eat() } type cat struct { } func (c cat) Eat() { fmt.Println("Cat like to eat fish!") } var _ animal = (*cat)(nil) func main() { fmt.Println("test static compile") }
标签:type main pre int compile class ace str static
原文地址:https://www.cnblogs.com/chunyou128/p/12017412.html