static compile

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")
}

  

猜你喜欢

转载自www.cnblogs.com/chunyou128/p/12017412.html