commit | f6a6b3f636fc09f53dec0c69fd529016a239959b | [log] [tgz] |
---|---|---|
author | KauĂȘ Soares da Silveira <kaue@google.com> | Wed Nov 18 17:18:25 2020 |
committer | txtpbfmt team <txtpbfmt-copybara-robot@google.com> | Wed Nov 18 17:18:49 2020 |
tree | b512db0643a568a8395c3e83a75179b42199409e | |
parent | ebd45c707ce7e392204ede07e14ebe3d12f1a8ea [diff] |
Update documentation of Format function to say 'text proto' instead of 'metadata'. PiperOrigin-RevId: 343092217
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.