ide jadge interfaces
IDE判断是否实现了接口
type MyInterface interface {
MyFn()
}
type MyStruct struct {
}
//func (s *MyStruct)MyFn() {
//
//}
var _ MyInterface = (*MyStruct)(nil)
IDE判断是否实现了接口
type MyInterface interface {
MyFn()
}
type MyStruct struct {
}
//func (s *MyStruct)MyFn() {
//
//}
var _ MyInterface = (*MyStruct)(nil)