commit | d4803f5a4f6887bf1227c03893095b296704f4fc | [log] [tgz] |
---|---|---|
author | Damien Neil <dneil@google.com> | Wed Sep 19 11:43:35 2018 -0700 |
committer | Damien Neil <dneil@google.com> | Thu Sep 20 17:08:44 2018 +0000 |
tree | b0da801bee00b4475495bc912cab53ba2add860c | |
parent | 55fe1c0178df1b49bd9f2124142798eecce5c297 [diff] [blame] |
cmd/protoc-gen-go: add "packed" encoding tag to fields Change-Id: I423039d6c9edb50a07781a6e76336ed364f21866 Reviewed-on: https://go-review.googlesource.com/136359 Reviewed-by: Joe Tsai <thebrokentoaster@gmail.com>
diff --git a/cmd/protoc-gen-go/main.go b/cmd/protoc-gen-go/main.go index d5bef26..e7119f1 100644 --- a/cmd/protoc-gen-go/main.go +++ b/cmd/protoc-gen-go/main.go
@@ -631,6 +631,9 @@ case protoreflect.Repeated: tag = append(tag, "rep") } + if field.Desc.IsPacked() { + tag = append(tag, "packed") + } // TODO: packed // name name := string(field.Desc.Name())