| commit | 91b5148b0328c588eef47cd0e5564480cc6fcee8 | [log] [tgz] |
|---|---|---|
| author | KauĂȘ Soares da Silveira <[email protected]> | Tue Sep 10 12:09:39 2019 |
| committer | Kaue Silveira <[email protected]> | Tue Sep 10 22:04:32 2019 |
| tree | f684a36220171e14d1fe41c30a38f28dd263976e | |
| parent | ce9fb2b1df64d91cc586b46de28bd91fbbb1bb6c [diff] |
Add README.md and open source parser tests. PiperOrigin-RevId: 268201455
txtpbfmt parses, edits and formats text proto files in a way that preserves comments.
This saves development (read/edit/review) time and enables automated edits.
Install:
$ go get -u github.com/protocolbuffers/txtpbfmt/cmd/txtpbfmt
Format files in-place:
$ ${GOPATH}/bin/txtpbfmt [FILES]
Write formatted input to stdout:
$ ${GOPATH}/bin/txtpbfmt < [FILE]
Main features:
Yes, see ast.go.
You can disable formatting for a whole file by adding a comment with “# txtpbfmt: disable” to the top of the file (before the first non-empty non-comment line), eg:
# File overview ... # txtpbfmt: disable content: { ... }
The .textproto extension is the most used extension inside Google (the second most popular choice is .textpb).
Currently there is no open source integration with any editor.