blob: 27cd75dece15d70f67a99156699485c3a80eab10 [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 {
Joe Tsai19058432019-02-27 21:46:29 -080016 for _, f := range gen.Files {
17 if f.Generate {
18 internal_gengogrpc.GenerateFile(gen, f)
Damien Neil2dc67182018-09-21 15:03:34 -070019 }
Damien Neil2dc67182018-09-21 15:03:34 -070020 }
21 return nil
22 })
23}