Skip to content

Instantly share code, notes, and snippets.

@harishb2k
Last active July 15, 2021 20:46
Show Gist options
  • Select an option

  • Save harishb2k/d8e8b21bf2ccdc5cb9b15e4a20ef5827 to your computer and use it in GitHub Desktop.

Select an option

Save harishb2k/d8e8b21bf2ccdc5cb9b15e4a20ef5827 to your computer and use it in GitHub Desktop.

Revisions

  1. harishb2k revised this gist Jul 15, 2021. 1 changed file with 4 additions and 1 deletion.
    5 changes: 4 additions & 1 deletion GolangProto.md
    Original file line number Diff line number Diff line change
    @@ -8,4 +8,7 @@ This will read hello.proto and put both proto and grpc file inside folder "pb".
    protoc --go_out=pb --go_opt=paths=source_relative --go-grpc_out=pb --go-grpc_opt=paths=source_relative hello.proto
    ```

    Note - both "go_out" and "go-grpc_out" are set as folder "pb"
    Note - both "go_out" and "go-grpc_out" are set as folder "pb" <br>

    #### Example project
    https://github.com/harishb2k/golang_grpc_with_opentracing
  2. harishb2k created this gist Jul 15, 2021.
    11 changes: 11 additions & 0 deletions GolangProto.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    ```shell
    go install google.golang.org/protobuf/cmd/[email protected]
    go install google.golang.org/grpc/cmd/[email protected]
    ```

    This will read hello.proto and put both proto and grpc file inside folder "pb". <br>
    ```shell
    protoc --go_out=pb --go_opt=paths=source_relative --go-grpc_out=pb --go-grpc_opt=paths=source_relative hello.proto
    ```

    Note - both "go_out" and "go-grpc_out" are set as folder "pb"