Guide

Go checker guide.

Generate scaffolding code

For example, the generated *.check.go of protobuf message ItemConf is:

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

Plugin: protoc-gen-go-tableau-checker

An example to use this protoc plugin: checker/test/gen.sh.

Full example

See go-tableau-checker.