Damien Neil | 2dc6718 | 2018-09-21 15:03:34 -0700 | [diff] [blame^] | 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 | |
| 5 | // The protoc-gen-go-grpc binary is a protoc plugin to generate Go gRPC |
| 6 | // service definitions. |
| 7 | package main |
| 8 | |
| 9 | import ( |
| 10 | "github.com/golang/protobuf/v2/cmd/protoc-gen-go-grpc/internal_gengogrpc" |
| 11 | "github.com/golang/protobuf/v2/protogen" |
| 12 | ) |
| 13 | |
| 14 | func main() { |
| 15 | protogen.Run(nil, func(gen *protogen.Plugin) error { |
| 16 | for _, file := range gen.Files { |
| 17 | if !file.Generate { |
| 18 | continue |
| 19 | } |
| 20 | internal_gengogrpc.GenerateFile(gen, file) |
| 21 | } |
| 22 | return nil |
| 23 | }) |
| 24 | } |