A protoc plugin to output file with text/template literal
$ go get github.com/tzmfreedom/protoc-gen-template
generate class files with following command
$ protoc -I. --template_out=template=go.template:. target.proto
You should write template file with text/template
type {{ .Prefix }}{{ .Type.Name }} struct {
{{ range .Type.Field }}{{ getName .Name }} {{ propertyType . $.PackageName }}
{{ end }}
}