Skip to content

Latest commit

 

History

History
18 lines (18 loc) · 507 Bytes

generate_stub_go.md

File metadata and controls

18 lines (18 loc) · 507 Bytes

Generate Server Stub

  • Install protoc (protocol buffer compiler)
  • Install the gRPC library
    go get -u google.golang.org/grpc
  • Install the protoc plug-in for Go
    go get -u github.com/golang/protobuf/protoc-gen-go
  • Make sure $GOPATH/bin in the $PATH
    PATH=$PATH:$GOPATH/bin
  • Run protoc
    protoc -I <path_of_directory_storing_proto_file> <path_of_proto_file> --go_out=plugins=grpc:<path_of_directory_where_you_want_to_generate_stub_file>