mirror of
https://github.com/protocolbuffers/protobuf-go.git
synced 2025-01-01 11:58:21 +00:00
25 lines
612 B
Go
25 lines
612 B
Go
|
// Copyright 2018 The Go Authors. All rights reserved.
|
||
|
// Use of this source code is governed by a BSD-style
|
||
|
// license that can be found in the LICENSE file.
|
||
|
|
||
|
// The protoc-gen-go-grpc binary is a protoc plugin to generate Go gRPC
|
||
|
// service definitions.
|
||
|
package main
|
||
|
|
||
|
import (
|
||
|
"github.com/golang/protobuf/v2/cmd/protoc-gen-go-grpc/internal_gengogrpc"
|
||
|
"github.com/golang/protobuf/v2/protogen"
|
||
|
)
|
||
|
|
||
|
func main() {
|
||
|
protogen.Run(nil, func(gen *protogen.Plugin) error {
|
||
|
for _, file := range gen.Files {
|
||
|
if !file.Generate {
|
||
|
continue
|
||
|
}
|
||
|
internal_gengogrpc.GenerateFile(gen, file)
|
||
|
}
|
||
|
return nil
|
||
|
})
|
||
|
}
|