containerd/cmd/protoc-gen-gogoctrd/main.go
Stephen J Day a3120172b0
cmd/protoc-gen-gogoctrd: turn off GoString generation
Signed-off-by: Stephen J Day <stephen.day@docker.com>
2017-02-15 13:37:48 -08:00

26 lines
633 B
Go

package main
import (
"github.com/gogo/protobuf/protoc-gen-gogo/descriptor"
"github.com/gogo/protobuf/vanity"
"github.com/gogo/protobuf/vanity/command"
)
func main() {
req := command.Read()
files := req.GetProtoFile()
files = vanity.FilterFiles(files, vanity.NotGoogleProtobufDescriptorProto)
for _, opt := range []func(*descriptor.FileDescriptorProto){
vanity.TurnOffGoGettersAll,
vanity.TurnOffGoStringerAll,
vanity.TurnOnMarshalerAll,
vanity.TurnOnStringerAll,
vanity.TurnOnUnmarshalerAll,
vanity.TurnOnSizerAll,
} {
vanity.ForEachFile(files, opt)
}
resp := command.Generate(req)
command.Write(resp)
}