commit | ec071cb513150190e4954cac9f84988b0624d167 | [log] [tgz] |
---|---|---|
author | txtpbfmt team <no-reply@google.com> | Wed Oct 02 23:59:48 2019 |
committer | txtpbfmt team <txtpbfmt-copybara-robot@google.com> | Thu Oct 03 00:00:10 2019 |
tree | 31cb926a442570acec302e31018bddf196c6a275 | |
parent | 4aa4343d0a6ebd70b0b013158f55ca88b3bde294 [diff] |
Move Unquote() to its own package and make implementation match golang/protobuf/proto/text_parser.go. PiperOrigin-RevId: 272551022
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.