main.go 593 B

1234567891011121314151617181920212223
  1. // Copyright 2018 The Go Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style
  3. // license that can be found in the LICENSE file.
  4. // The protoc-gen-go-grpc binary is a protoc plugin to generate Go gRPC
  5. // service definitions.
  6. package main
  7. import (
  8. "google.golang.org/protobuf/cmd/protoc-gen-go-grpc/internal_gengogrpc"
  9. "google.golang.org/protobuf/compiler/protogen"
  10. )
  11. func main() {
  12. protogen.Run(nil, func(gen *protogen.Plugin) error {
  13. for _, f := range gen.Files {
  14. if f.Generate {
  15. internal_gengogrpc.GenerateFile(gen, f)
  16. }
  17. }
  18. return nil
  19. })
  20. }