all: reformat with go1.19 gofmt

Apply go1.19 gofmt to non-generated files.

Generated .pb.go files are created by generate.bash using Go 1.18,
so leave them unchanged for now.

Change-Id: Ied36c83cf99704988d059bf0412e677f0fbc71b0
Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/418676
Reviewed-by: Ian Lance Taylor <[email protected]>
Reviewed-by: Lasse Folger <[email protected]>
diff --git a/cmd/protoc-gen-go/main.go b/cmd/protoc-gen-go/main.go
index 0559ee3..b8f6a16 100644
--- a/cmd/protoc-gen-go/main.go
+++ b/cmd/protoc-gen-go/main.go
@@ -6,6 +6,7 @@
 // both proto2 and proto3 versions of the protocol buffer language.
 //
 // For more information about the usage of this plugin, see:
+//
 //	https://developers.google.com/protocol-buffers/docs/reference/go-generated
 package main
 
diff --git a/encoding/protowire/wire.go b/encoding/protowire/wire.go
index 9c61112..ce57f57 100644
--- a/encoding/protowire/wire.go
+++ b/encoding/protowire/wire.go
@@ -516,6 +516,7 @@
 }
 
 // DecodeZigZag decodes a zig-zag-encoded uint64 as an int64.
+//
 //	Input:  {…,  5,  3,  1,  0,  2,  4,  6, …}
 //	Output: {…, -3, -2, -1,  0, +1, +2, +3, …}
 func DecodeZigZag(x uint64) int64 {
@@ -523,6 +524,7 @@
 }
 
 // EncodeZigZag encodes an int64 as a zig-zag-encoded uint64.
+//
 //	Input:  {…, -3, -2, -1,  0, +1, +2, +3, …}
 //	Output: {…,  5,  3,  1,  0,  2,  4,  6, …}
 func EncodeZigZag(x int64) uint64 {
@@ -530,6 +532,7 @@
 }
 
 // DecodeBool decodes a uint64 as a bool.
+//
 //	Input:  {    0,    1,    2, …}
 //	Output: {false, true, true, …}
 func DecodeBool(x uint64) bool {
@@ -537,6 +540,7 @@
 }
 
 // EncodeBool encodes a bool as a uint64.
+//
 //	Input:  {false, true}
 //	Output: {    0,    1}
 func EncodeBool(x bool) uint64 {
diff --git a/internal/encoding/messageset/messageset.go b/internal/encoding/messageset/messageset.go
index ef6d498..a6693f0 100644
--- a/internal/encoding/messageset/messageset.go
+++ b/internal/encoding/messageset/messageset.go
@@ -33,6 +33,7 @@
 // ExtensionName is the field name for extensions of MessageSet.
 //
 // A valid MessageSet extension must be of the form:
+//
 //	message MyMessage {
 //		extend proto2.bridge.MessageSet {
 //			optional MyMessage message_set_extension = 1234;
diff --git a/internal/encoding/text/decode_number.go b/internal/encoding/text/decode_number.go
index f2d90b7..81a5d8c 100644
--- a/internal/encoding/text/decode_number.go
+++ b/internal/encoding/text/decode_number.go
@@ -50,8 +50,10 @@
 
 // parseNumber constructs a number object from given input. It allows for the
 // following patterns:
-//   integer: ^-?([1-9][0-9]*|0[xX][0-9a-fA-F]+|0[0-7]*)
-//   float: ^-?((0|[1-9][0-9]*)?([.][0-9]*)?([eE][+-]?[0-9]+)?[fF]?)
+//
+//	integer: ^-?([1-9][0-9]*|0[xX][0-9a-fA-F]+|0[0-7]*)
+//	float: ^-?((0|[1-9][0-9]*)?([.][0-9]*)?([eE][+-]?[0-9]+)?[fF]?)
+//
 // It also returns the number of parsed bytes for the given number, 0 if it is
 // not a number.
 func parseNumber(input []byte) number {
diff --git a/internal/encoding/text/doc.go b/internal/encoding/text/doc.go
index 0ce8d6f..7ae6c2a 100644
--- a/internal/encoding/text/doc.go
+++ b/internal/encoding/text/doc.go
@@ -24,6 +24,6 @@
 // the Go implementation should as well.
 //
 // The text format is almost a superset of JSON except:
-//	* message keys are not quoted strings, but identifiers
-//	* the top-level value must be a message without the delimiters
+//   - message keys are not quoted strings, but identifiers
+//   - the top-level value must be a message without the delimiters
 package text
diff --git a/internal/filetype/build.go b/internal/filetype/build.go
index 3744dc8..f0e38c4 100644
--- a/internal/filetype/build.go
+++ b/internal/filetype/build.go
@@ -19,8 +19,7 @@
 // Builder constructs type descriptors from a raw file descriptor
 // and associated Go types for each enum and message declaration.
 //
-//
-// Flattened Ordering
+// # Flattened Ordering
 //
 // The protobuf type system represents declarations as a tree. Certain nodes in
 // the tree require us to either associate it with a concrete Go type or to
diff --git a/internal/impl/message_reflect.go b/internal/impl/message_reflect.go
index 33eca45..d9ea010 100644
--- a/internal/impl/message_reflect.go
+++ b/internal/impl/message_reflect.go
@@ -320,7 +320,6 @@
 // in an allocation-free way without needing to have a shadow Go type generated
 // for every message type. This technique only works using unsafe.
 //
-//
 // Example generated code:
 //
 //	type M struct {
@@ -351,12 +350,11 @@
 // It has access to the message info as its first field, and a pointer to the
 // MessageState is identical to a pointer to the concrete message value.
 //
-//
 // Requirements:
-//	• The type M must implement protoreflect.ProtoMessage.
-//	• The address of m must not be nil.
-//	• The address of m and the address of m.state must be equal,
-//	even though they are different Go types.
+//   - The type M must implement protoreflect.ProtoMessage.
+//   - The address of m must not be nil.
+//   - The address of m and the address of m.state must be equal,
+//     even though they are different Go types.
 type MessageState struct {
 	pragma.NoUnkeyedLiterals
 	pragma.DoNotCompare
diff --git a/internal/version/version.go b/internal/version/version.go
index 37c90b5..f836071 100644
--- a/internal/version/version.go
+++ b/internal/version/version.go
@@ -12,44 +12,43 @@
 
 // These constants determine the current version of this module.
 //
-//
 // For our release process, we enforce the following rules:
-//	* Tagged releases use a tag that is identical to String.
-//	* Tagged releases never reference a commit where the String
-//	contains "devel".
-//	* The set of all commits in this repository where String
-//	does not contain "devel" must have a unique String.
-//
+//   - Tagged releases use a tag that is identical to String.
+//   - Tagged releases never reference a commit where the String
+//     contains "devel".
+//   - The set of all commits in this repository where String
+//     does not contain "devel" must have a unique String.
 //
 // Steps for tagging a new release:
-//	1. Create a new CL.
 //
-//	2. Update Minor, Patch, and/or PreRelease as necessary.
-//	PreRelease must not contain the string "devel".
+//  1. Create a new CL.
 //
-//	3. Since the last released minor version, have there been any changes to
-//	generator that relies on new functionality in the runtime?
-//	If yes, then increment RequiredGenerated.
+//  2. Update Minor, Patch, and/or PreRelease as necessary.
+//     PreRelease must not contain the string "devel".
 //
-//	4. Since the last released minor version, have there been any changes to
-//	the runtime that removes support for old .pb.go source code?
-//	If yes, then increment SupportMinimum.
+//  3. Since the last released minor version, have there been any changes to
+//     generator that relies on new functionality in the runtime?
+//     If yes, then increment RequiredGenerated.
 //
-//	5. Send out the CL for review and submit it.
-//	Note that the next CL in step 8 must be submitted after this CL
-//	without any other CLs in-between.
+//  4. Since the last released minor version, have there been any changes to
+//     the runtime that removes support for old .pb.go source code?
+//     If yes, then increment SupportMinimum.
 //
-//	6. Tag a new version, where the tag is is the current String.
+//  5. Send out the CL for review and submit it.
+//     Note that the next CL in step 8 must be submitted after this CL
+//     without any other CLs in-between.
 //
-//	7. Write release notes for all notable changes
-//	between this release and the last release.
+//  6. Tag a new version, where the tag is is the current String.
 //
-//	8. Create a new CL.
+//  7. Write release notes for all notable changes
+//     between this release and the last release.
 //
-//	9. Update PreRelease to include the string "devel".
-//	For example: "" -> "devel" or "rc.1" -> "rc.1.devel"
+//  8. Create a new CL.
 //
-//	10. Send out the CL for review and submit it.
+//  9. Update PreRelease to include the string "devel".
+//     For example: "" -> "devel" or "rc.1" -> "rc.1.devel"
+//
+//  10. Send out the CL for review and submit it.
 const (
 	Major      = 1
 	Minor      = 28
@@ -60,6 +59,7 @@
 // String formats the version string for this module in semver format.
 //
 // Examples:
+//
 //	v1.20.1
 //	v1.21.0-rc.1
 func String() string {
diff --git a/proto/decode.go b/proto/decode.go
index 11bf717..48d4794 100644
--- a/proto/decode.go
+++ b/proto/decode.go
@@ -19,7 +19,8 @@
 // UnmarshalOptions configures the unmarshaler.
 //
 // Example usage:
-//   err := UnmarshalOptions{DiscardUnknown: true}.Unmarshal(b, m)
+//
+//	err := UnmarshalOptions{DiscardUnknown: true}.Unmarshal(b, m)
 type UnmarshalOptions struct {
 	pragma.NoUnkeyedLiterals
 
diff --git a/proto/doc.go b/proto/doc.go
index c52d8c4..08d2a46 100644
--- a/proto/doc.go
+++ b/proto/doc.go
@@ -6,18 +6,17 @@
 //
 // For documentation on protocol buffers in general, see:
 //
-//   https://developers.google.com/protocol-buffers
+//	https://developers.google.com/protocol-buffers
 //
 // For a tutorial on using protocol buffers with Go, see:
 //
-//   https://developers.google.com/protocol-buffers/docs/gotutorial
+//	https://developers.google.com/protocol-buffers/docs/gotutorial
 //
 // For a guide to generated Go protocol buffer code, see:
 //
-//   https://developers.google.com/protocol-buffers/docs/reference/go-generated
+//	https://developers.google.com/protocol-buffers/docs/reference/go-generated
 //
-//
-// Binary serialization
+// # Binary serialization
 //
 // This package contains functions to convert to and from the wire format,
 // an efficient binary serialization of protocol buffers.
@@ -30,8 +29,7 @@
 // • Unmarshal converts a message from the wire format.
 // The UnmarshalOptions type provides more control over wire unmarshaling.
 //
-//
-// Basic message operations
+// # Basic message operations
 //
 // • Clone makes a deep copy of a message.
 //
@@ -45,8 +43,7 @@
 //
 // • CheckInitialized reports whether all required fields in a message are set.
 //
-//
-// Optional scalar constructors
+// # Optional scalar constructors
 //
 // The API for some generated messages represents optional scalar fields
 // as pointers to a value. For example, an optional string field has the
@@ -61,16 +58,14 @@
 //
 // Optional scalar fields are only supported in proto2.
 //
-//
-// Extension accessors
+// # Extension accessors
 //
 // • HasExtension, GetExtension, SetExtension, and ClearExtension
 // access extension field values in a protocol buffer message.
 //
 // Extension fields are only supported in proto2.
 //
-//
-// Related packages
+// # Related packages
 //
 // • Package "google.golang.org/protobuf/encoding/protojson" converts messages to
 // and from JSON.
diff --git a/proto/encode.go b/proto/encode.go
index d18239c..bf7f816 100644
--- a/proto/encode.go
+++ b/proto/encode.go
@@ -16,7 +16,8 @@
 // MarshalOptions configures the marshaler.
 //
 // Example usage:
-//   b, err := MarshalOptions{Deterministic: true}.Marshal(m)
+//
+//	b, err := MarshalOptions{Deterministic: true}.Marshal(m)
 type MarshalOptions struct {
 	pragma.NoUnkeyedLiterals
 
@@ -101,7 +102,9 @@
 // otherwise it returns a non-nil empty buffer.
 //
 // This is to assist the edge-case where user-code does the following:
+//
 //	m1.OptionalBytes, _ = proto.Marshal(m2)
+//
 // where they expect the proto2 "optional_bytes" field to be populated
 // if any only if m2 is a valid message.
 func emptyBytesForMessage(m Message) []byte {
diff --git a/reflect/protodesc/desc_resolve.go b/reflect/protodesc/desc_resolve.go
index cebb36c..27d7e35 100644
--- a/reflect/protodesc/desc_resolve.go
+++ b/reflect/protodesc/desc_resolve.go
@@ -155,9 +155,9 @@
 //
 // Suppose the scope was "fizz.buzz" and the reference was "Foo.Bar",
 // then the following full names are searched:
-//	* fizz.buzz.Foo.Bar
-//	* fizz.Foo.Bar
-//	* Foo.Bar
+//   - fizz.buzz.Foo.Bar
+//   - fizz.Foo.Bar
+//   - Foo.Bar
 func (r *resolver) findDescriptor(scope protoreflect.FullName, ref partialName) (protoreflect.Descriptor, error) {
 	if !ref.IsValid() {
 		return nil, errors.New("invalid name reference: %q", ref)
diff --git a/reflect/protopath/path.go b/reflect/protopath/path.go
index 07f839d..91562a8 100644
--- a/reflect/protopath/path.go
+++ b/reflect/protopath/path.go
@@ -99,6 +99,7 @@
 // Do not depend on the output being stable.
 //
 // For example:
+//
 //	(path.to.MyMessage).list_field[5].map_field["hello"] = {hello: "world"}
 func (p Values) String() string {
 	n := p.Len()
diff --git a/reflect/protorange/range.go b/reflect/protorange/range.go
index 24794cd..6f4c58b 100644
--- a/reflect/protorange/range.go
+++ b/reflect/protorange/range.go
@@ -300,6 +300,7 @@
 
 // amendError amends the previous error with the current error if it is
 // considered more serious. The precedence order for errors is:
+//
 //	nil < Break < Terminate < previous non-nil < current non-nil
 func amendError(prev, curr error) error {
 	switch {
diff --git a/reflect/protoreflect/proto.go b/reflect/protoreflect/proto.go
index 8be08b1..55aa149 100644
--- a/reflect/protoreflect/proto.go
+++ b/reflect/protoreflect/proto.go
@@ -8,8 +8,7 @@
 // defined in proto source files and value interfaces which provide the
 // ability to examine and manipulate the contents of messages.
 //
-//
-// Protocol Buffer Descriptors
+// # Protocol Buffer Descriptors
 //
 // Protobuf descriptors (e.g., EnumDescriptor or MessageDescriptor)
 // are immutable objects that represent protobuf type information.
@@ -26,8 +25,7 @@
 // The "google.golang.org/protobuf/reflect/protodesc" package converts between
 // google.protobuf.DescriptorProto messages and protobuf descriptors.
 //
-//
-// Go Type Descriptors
+// # Go Type Descriptors
 //
 // A type descriptor (e.g., EnumType or MessageType) is a constructor for
 // a concrete Go type that represents the associated protobuf descriptor.
@@ -41,8 +39,7 @@
 // The "google.golang.org/protobuf/types/dynamicpb" package can be used to
 // create Go type descriptors from protobuf descriptors.
 //
-//
-// Value Interfaces
+// # Value Interfaces
 //
 // The Enum and Message interfaces provide a reflective view over an
 // enum or message instance. For enums, it provides the ability to retrieve
@@ -55,13 +52,11 @@
 // The "github.com/golang/protobuf/proto".MessageReflect function can be used
 // to obtain a reflective view on older messages.
 //
-//
-// Relationships
+// # Relationships
 //
 // The following diagrams demonstrate the relationships between
 // various types declared in this package.
 //
-//
 //	                       ┌───────────────────────────────────┐
 //	                       V                                   │
 //	   ┌────────────── New(n) ─────────────┐                   │
@@ -83,7 +78,6 @@
 //
 // • An Enum is a concrete enum instance. Generated enums implement Enum.
 //
-//
 //	  ┌──────────────── New() ─────────────────┐
 //	  │                                        │
 //	  │         ┌─── Descriptor() ─────┐       │   ┌── Interface() ───┐
@@ -115,7 +109,6 @@
 // calling reflect.ValueOf, and the Message.Interface method is similar to
 // calling reflect.Value.Interface.
 //
-//
 //	      ┌── TypeDescriptor() ──┐    ┌───── Descriptor() ─────┐
 //	      │                      V    │                        V
 //	╔═══════════════╗  ╔═════════════════════════╗  ╔═════════════════════╗
diff --git a/reflect/protoreflect/source.go b/reflect/protoreflect/source.go
index 121ba3a..0b99428 100644
--- a/reflect/protoreflect/source.go
+++ b/reflect/protoreflect/source.go
@@ -87,6 +87,7 @@
 // in a future version of this module.
 //
 // Example output:
+//
 //	.message_type[6].nested_type[15].field[3]
 func (p SourcePath) String() string {
 	b := p.appendFileDescriptorProto(nil)
diff --git a/reflect/protoreflect/type.go b/reflect/protoreflect/type.go
index 8e53c44..3867470 100644
--- a/reflect/protoreflect/type.go
+++ b/reflect/protoreflect/type.go
@@ -480,6 +480,7 @@
 // relative to the parent that it is declared within.
 //
 // For example:
+//
 //	syntax = "proto2";
 //	package example;
 //	message FooMessage {
diff --git a/reflect/protoreflect/value_union.go b/reflect/protoreflect/value_union.go
index eb7764c..ca8e28c 100644
--- a/reflect/protoreflect/value_union.go
+++ b/reflect/protoreflect/value_union.go
@@ -50,6 +50,7 @@
 // always references the source object.
 //
 // For example:
+//
 //	// Append a 0 to a "repeated int32" field.
 //	// Since the Value returned by Mutable is guaranteed to alias
 //	// the source message, modifying the Value modifies the message.
@@ -392,6 +393,7 @@
 //	╚═════════╧═════════════════════════════════════╝
 //
 // A MapKey is constructed and accessed through a Value:
+//
 //	k := ValueOf("hash").MapKey() // convert string to MapKey
 //	s := k.String()               // convert MapKey to string
 //
diff --git a/reflect/protoregistry/registry.go b/reflect/protoregistry/registry.go
index 59f024c..58352a6 100644
--- a/reflect/protoregistry/registry.go
+++ b/reflect/protoregistry/registry.go
@@ -30,9 +30,11 @@
 // conflictPolicy configures the policy for handling registration conflicts.
 //
 // It can be over-written at compile time with a linker-initialized variable:
+//
 //	go build -ldflags "-X google.golang.org/protobuf/reflect/protoregistry.conflictPolicy=warn"
 //
 // It can be over-written at program execution with an environment variable:
+//
 //	GOLANG_PROTOBUF_REGISTRATION_CONFLICT=warn ./main
 //
 // Neither of the above are covered by the compatibility promise and
diff --git a/runtime/protoimpl/version.go b/runtime/protoimpl/version.go
index ff094e1..a105cb2 100644
--- a/runtime/protoimpl/version.go
+++ b/runtime/protoimpl/version.go
@@ -26,16 +26,19 @@
 // EnforceVersion is used by code generated by protoc-gen-go
 // to statically enforce minimum and maximum versions of this package.
 // A compilation failure implies either that:
-//	* the runtime package is too old and needs to be updated OR
-//	* the generated code is too old and needs to be regenerated.
+//   - the runtime package is too old and needs to be updated OR
+//   - the generated code is too old and needs to be regenerated.
 //
 // The runtime package can be upgraded by running:
+//
 //	go get google.golang.org/protobuf
 //
 // The generated code can be regenerated by running:
+//
 //	protoc --go_out=${PROTOC_GEN_GO_ARGS} ${PROTO_FILES}
 //
 // Example usage by generated code:
+//
 //	const (
 //		// Verify that this generated code is sufficiently up-to-date.
 //		_ = protoimpl.EnforceVersion(genVersion - protoimpl.MinVersion)
@@ -49,6 +52,7 @@
 type EnforceVersion uint
 
 // This enforces the following invariant:
+//
 //	MinVersion ≤ GenVersion ≤ MaxVersion
 const (
 	_ = EnforceVersion(GenVersion - MinVersion)
diff --git a/testing/protocmp/util.go b/testing/protocmp/util.go
index 79f3072..ee66ae9 100644
--- a/testing/protocmp/util.go
+++ b/testing/protocmp/util.go
@@ -28,11 +28,11 @@
 // where the enum is the same type as the specified enum.
 //
 // The Go type of the last path step may be an:
-//	• Enum for singular fields, elements of a repeated field,
-//	values of a map field, or standalone Enums
-//	• []Enum for list fields
-//	• map[K]Enum for map fields
-//	• interface{} for a Message map entry value
+//   - Enum for singular fields, elements of a repeated field,
+//     values of a map field, or standalone Enums
+//   - []Enum for list fields
+//   - map[K]Enum for map fields
+//   - interface{} for a Message map entry value
 //
 // This must be used in conjunction with Transform.
 func FilterEnum(enum protoreflect.Enum, opt cmp.Option) cmp.Option {
@@ -44,11 +44,11 @@
 // message values, where the message is the same type as the specified message.
 //
 // The Go type of the last path step may be an:
-//	• Message for singular fields, elements of a repeated field,
-//	values of a map field, or standalone Messages
-//	• []Message for list fields
-//	• map[K]Message for map fields
-//	• interface{} for a Message map entry value
+//   - Message for singular fields, elements of a repeated field,
+//     values of a map field, or standalone Messages
+//   - []Message for list fields
+//   - map[K]Message for map fields
+//   - interface{} for a Message map entry value
 //
 // This must be used in conjunction with Transform.
 func FilterMessage(message proto.Message, opt cmp.Option) cmp.Option {
@@ -59,10 +59,10 @@
 // in the message. It panics if a field of the given name does not exist.
 //
 // The Go type of the last path step may be an:
-//	• T for singular fields
-//	• []T for list fields
-//	• map[K]T for map fields
-//	• interface{} for a Message map entry value
+//   - T for singular fields
+//   - []T for list fields
+//   - map[K]T for map fields
+//   - interface{} for a Message map entry value
 //
 // This must be used in conjunction with Transform.
 func FilterField(message proto.Message, name protoreflect.Name, opt cmp.Option) cmp.Option {
@@ -75,10 +75,10 @@
 // does not exist.
 //
 // The Go type of the last path step may be an:
-//	• T for singular fields
-//	• []T for list fields
-//	• map[K]T for map fields
-//	• interface{} for a Message map entry value
+//   - T for singular fields
+//   - []T for list fields
+//   - map[K]T for map fields
+//   - interface{} for a Message map entry value
 //
 // This must be used in conjunction with Transform.
 func FilterOneof(message proto.Message, name protoreflect.Name, opt cmp.Option) cmp.Option {
@@ -89,10 +89,10 @@
 // FilterDescriptor ignores the specified descriptor.
 //
 // The following descriptor types may be specified:
-//	• protoreflect.EnumDescriptor
-//	• protoreflect.MessageDescriptor
-//	• protoreflect.FieldDescriptor
-//	• protoreflect.OneofDescriptor
+//   - protoreflect.EnumDescriptor
+//   - protoreflect.MessageDescriptor
+//   - protoreflect.FieldDescriptor
+//   - protoreflect.OneofDescriptor
 //
 // For the behavior of each, see the corresponding filter function.
 // Since this filter accepts a protoreflect.FieldDescriptor, it can be used
@@ -513,10 +513,10 @@
 // Go element type for the repeated field kind.
 //
 // The element type T can be one of the following:
-//	• Go type for a protobuf scalar kind except for an enum
-//	  (i.e., bool, int32, int64, uint32, uint64, float32, float64, string, and []byte)
-//	• E where E is a concrete enum type that implements protoreflect.Enum
-//	• M where M is a concrete message type that implement proto.Message
+//   - Go type for a protobuf scalar kind except for an enum
+//     (i.e., bool, int32, int64, uint32, uint64, float32, float64, string, and []byte)
+//   - E where E is a concrete enum type that implements protoreflect.Enum
+//   - M where M is a concrete message type that implement proto.Message
 //
 // This option only applies to repeated fields within a protobuf message.
 // It does not operate on higher-order Go types that seem like a repeated field.
@@ -608,14 +608,14 @@
 // It panics if the field does not exist or is not a repeated field.
 //
 // The sort ordering is as follows:
-//	• Booleans are sorted where false is sorted before true.
-//	• Integers are sorted in ascending order.
-//	• Floating-point numbers are sorted in ascending order according to
-//	  the total ordering defined by IEEE-754 (section 5.10).
-//	• Strings and bytes are sorted lexicographically in ascending order.
-//	• Enums are sorted in ascending order based on its numeric value.
-//	• Messages are sorted according to some arbitrary ordering
-//	  which is undefined and may change in future implementations.
+//   - Booleans are sorted where false is sorted before true.
+//   - Integers are sorted in ascending order.
+//   - Floating-point numbers are sorted in ascending order according to
+//     the total ordering defined by IEEE-754 (section 5.10).
+//   - Strings and bytes are sorted lexicographically in ascending order.
+//   - Enums are sorted in ascending order based on its numeric value.
+//   - Messages are sorted according to some arbitrary ordering
+//     which is undefined and may change in future implementations.
 //
 // The ordering chosen for repeated messages is unlikely to be aesthetically
 // preferred by humans. Consider using a custom sort function:
diff --git a/testing/protopack/pack.go b/testing/protopack/pack.go
index 683ce0b..1777381 100644
--- a/testing/protopack/pack.go
+++ b/testing/protopack/pack.go
@@ -173,6 +173,7 @@
 // Marshal encodes a syntax tree into the protobuf wire format.
 //
 // Example message definition:
+//
 //	message MyMessage {
 //		string field1 = 1;
 //		int64 field2 = 2;
@@ -180,6 +181,7 @@
 //	}
 //
 // Example encoded message:
+//
 //	b := Message{
 //		Tag{1, BytesType}, String("Hello, world!"),
 //		Tag{2, VarintType}, Varint(-10),
@@ -189,6 +191,7 @@
 //	}.Marshal()
 //
 // Resulting wire data:
+//
 //	0x0000  0a 0d 48 65 6c 6c 6f 2c  20 77 6f 72 6c 64 21 10  |..Hello, world!.|
 //	0x0010  f6 ff ff ff ff ff ff ff  ff 01 1a 0c cd cc 8c 3f  |...............?|
 //	0x0020  cd cc 0c 40 33 33 53 40                           |...@33S@|
@@ -252,6 +255,7 @@
 // inserted into the syntax tree as a Tag.
 //
 // The contents of each wire type is mapped to the following Go types:
+//
 //	VarintType   => Uvarint
 //	Fixed32Type  => Uint32
 //	Fixed64Type  => Uint64
@@ -261,6 +265,7 @@
 // Since the wire format is not self-describing, this function cannot parse
 // sub-messages and will leave them as the Bytes type. Further manual parsing
 // can be performed as such:
+//
 //	var m, m1, m2 Message
 //	m.Unmarshal(b)
 //	m1.Unmarshal(m[3].(Bytes))
@@ -279,6 +284,7 @@
 // represent the wire data.
 //
 // The contents of each wire type is mapped to one of the following Go types:
+//
 //	VarintType   => Bool, Varint, Svarint, Uvarint
 //	Fixed32Type  => Int32, Uint32, Float32
 //	Fixed64Type  => Uint32, Uint64, Float64