blob: 4cdc6ba7c09099636f9766133d9eac2a45b3636f [file] [log] [blame]
khenaidoo5fc5cea2021-08-11 17:39:16 -04001#!/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#
16proto=$1
17protoc --go_out=plugins=grpc:. $proto