commit | b6a44e8056c16f48f62a2c7679fbffc8fc0440e4 | [log] [tgz] |
---|---|---|
author | kaue <kaue@google.com> | Wed Jun 03 13:24:16 2020 |
committer | txtpbfmt team <txtpbfmt-copybara-robot@google.com> | Wed Jun 03 13:55:45 2020 |
tree | 207ddec288b0432b05395143bb8040a515260297 | |
parent | 82b90aee46e6b0010868e9448841d716d319029a [diff] |
Move new files to their own folder to fix package error, attempt 2. PiperOrigin-RevId: 314518768
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.