Justin SB 9d4d1ca5ed internal/descfmt: always include type name in FormatList
FormatList previously formatted output inconsistently when called on
EnumDescriptors, ServiceDescriptors and ExtensionDescriptors: other
types included the type name before {{; these types did not.

Add a default case that includes the type in these (and any other)
cases also.

Expanded tests to demonstrate and verify the new behaviour.

Change-Id: I9f53cb6548c4448a12c17d519639357ebdfa809b
Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/286132
Reviewed-by: Joe Tsai <thebrokentoaster@gmail.com>
Trust: Joe Tsai <joetsai@google.com>
Trust: Matthew Dempsky <mdempsky@google.com>
2021-02-22 23:39:21 +00:00
..