blob: 238a63ade62de7902bf01626d3440ae4b2432272 [file] [log] [blame]
Damien Neil2dc67182018-09-21 15:03:34 -07001// 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.
7package main
8
9import (
10 "github.com/golang/protobuf/v2/cmd/protoc-gen-go-grpc/internal_gengogrpc"
11 "github.com/golang/protobuf/v2/protogen"
12)
13
14func 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}