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 { |
Joe Tsai | 1905843 | 2019-02-27 21:46:29 -0800 | [diff] [blame] | 16 | for _, f := range gen.Files { |
| 17 | if f.Generate { |
| 18 | internal_gengogrpc.GenerateFile(gen, f) |
Damien Neil | 2dc6718 | 2018-09-21 15:03:34 -0700 | [diff] [blame] | 19 | } |
Damien Neil | 2dc6718 | 2018-09-21 15:03:34 -0700 | [diff] [blame] | 20 | } |
| 21 | return nil |
| 22 | }) |
| 23 | } |