You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
nnet/component/base.go

14 lines
303 B
Go

package component
var _ Component = (*Base)(nil)
// Base 空组件,实现组件时,优先嵌入此基类,然后根据基类方法进行重写
// 可方便实现Component无需每个Component都要实现两个方法
type Base struct{}
func (*Base) OnInit() {
}
func (*Base) OnShutdown() {
}