mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-04-29 23:24:55 +02:00
protoc: add encode/decode commands (#15734)
This commit is contained in:
parent
27bdd850a1
commit
a824cd5658
1 changed files with 12 additions and 0 deletions
|
@ -14,3 +14,15 @@
|
|||
- Generate code for multiple languages:
|
||||
|
||||
`protoc --csharp_out={{path/to/c#_output_directory}} --js_out={{path/to/js_output_directory}} {{input_file.proto}}`
|
||||
|
||||
- Encode a text-format message into a protocol message from a `.proto` file:
|
||||
|
||||
`protoc --encode={{TypeName}} {{input_file.proto}} < {{message.txt}}`
|
||||
|
||||
- Decode a protocol message into text-format from a `.proto` file:
|
||||
|
||||
`protoc --decode={{TypeName}} {{input_file.proto}} < {{message.bin}}`
|
||||
|
||||
- Decode a protocol message into raw tag/value pairs:
|
||||
|
||||
`protoc --decode_raw < {{message.bin}}`
|
||||
|
|
Loading…
Add table
Reference in a new issue