Update cheatsheets

This commit is contained in:
ivuorinen
2025-02-16 00:19:08 +00:00
parent cd175aefbd
commit 03b9dd8fee
3 changed files with 42 additions and 1 deletions

View File

@@ -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}}`