指南
Go checker 使用指南。
On this page
生成脚手架代码
例如,protobuf message ItemConf 生成的 *.check.go 文件内容如下:
type ItemConf struct {
tableau.ItemConf
}
func (x *ItemConf) Check(hub *tableau.Hub) error {
// TODO: implement here.
return nil
}
func (x *ItemConf) CheckCompatibility(hub, newHub *tableau.Hub) error {
// TODO: implement here.
return nil
}
func init() {
// NOTE: This func is auto-generated. DO NOT EDIT.
register(func() tableau.Messager {
return new(ItemConf)
})
}
插件:protoc-gen-go-tableau-checker
使用此 protoc 插件的示例: checker/test/gen.sh。