mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-03-22 08:02:34 +00:00
Update cheatsheets
This commit is contained in:
12
tldr/protoc
12
tldr/protoc
@@ -19,3 +19,15 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
- 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}}`
|
||||
|
||||
Reference in New Issue
Block a user