gitee.com/ks-custle/core-gm@v0.0.0-20230922171213-b83bdd97b62c/grpc/codegen.sh (about) 1 #!/usr/bin/env bash 2 3 # This script serves as an example to demonstrate how to generate the gRPC-Go 4 # interface and the related messages from .proto file. 5 # 6 # It assumes the installation of i) Google proto buffer compiler at 7 # https://github.com/google/protobuf (after v2.6.1) and ii) the Go codegen 8 # plugin at https://github.com/golang/protobuf (after 2015-02-20). If you have 9 # not, please install them first. 10 # 11 # We recommend running this script at $GOPATH/src. 12 # 13 # If this is not what you need, feel free to make your own scripts. Again, this 14 # script is for demonstration purpose. 15 # 16 proto=$1 17 protoc --go_out=plugins=grpc:. $proto