codegen.sh 627 B

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