0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

【備忘録】protocコマンドを実行するときのpbファイルの出力先の指定

Posted at

以下のフォルダ構成でprotoフォルダで以下のコマンドを実行します。
root/
 ├ proto/
 └ pb/

protoc --go_out=. --go_opt=paths=source_relative --go-grpc_out=. --go-grpc_opt=paths=source_relative user.proto

そうすると、protoフォルダにuser.pbファイルが出力されてしまいます。user.pbをpbフォルダに出力するには以下のコマンドを実行する必要があります。

protoc --go_out=../pb --go_opt=paths=source_relative --go-grpc_out=../pb --go-grpc_opt=paths=source_relative user.proto
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?