all: trivial formatting changes

Changes:
* import grouping for third-party dependencies
* import grouping for generated protobufs
* blank space removal

Change-Id: I2950b0606bb2064046d79a23a78b05c23147cbfe
Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/221017
Reviewed-by: Damien Neil <dneil@google.com>
This commit is contained in:
Joe Tsai 2020-02-25 12:51:10 -08:00 committed by Joe Tsai
parent ee3cfcba3f
commit e0daf31d84
20 changed files with 19 additions and 5 deletions

View File

@ -10,6 +10,7 @@ import (
"testing"
"github.com/google/go-cmp/cmp"
"google.golang.org/protobuf/proto"
"google.golang.org/protobuf/reflect/protoreflect"

View File

@ -10,6 +10,7 @@ import (
"testing"
"github.com/google/go-cmp/cmp"
"google.golang.org/protobuf/encoding/protojson"
"google.golang.org/protobuf/internal/detrand"
"google.golang.org/protobuf/internal/encoding/pack"

View File

@ -9,6 +9,7 @@ import (
"testing"
"github.com/google/go-cmp/cmp"
"google.golang.org/protobuf/encoding/prototext"
"google.golang.org/protobuf/internal/detrand"
"google.golang.org/protobuf/internal/encoding/pack"

View File

@ -221,7 +221,6 @@ func normalizeToIntString(n numberParts) (string, bool) {
for i := 0; i < exp-fracSize; i++ {
num = append(num, '0')
}
} else {
// For negative E, shift digits in integer part out.

View File

@ -12,6 +12,7 @@ import (
"unicode/utf8"
"github.com/google/go-cmp/cmp"
"google.golang.org/protobuf/internal/encoding/json"
)

View File

@ -11,6 +11,7 @@ import (
"github.com/google/go-cmp/cmp"
"github.com/google/go-cmp/cmp/cmpopts"
"google.golang.org/protobuf/internal/detrand"
"google.golang.org/protobuf/internal/encoding/json"
)

View File

@ -12,6 +12,7 @@ import (
"testing"
"github.com/google/go-cmp/cmp"
"google.golang.org/protobuf/encoding/prototext"
pdesc "google.golang.org/protobuf/reflect/protodesc"
pref "google.golang.org/protobuf/reflect/protoreflect"

View File

@ -12,6 +12,7 @@ import (
"unicode/utf8"
"github.com/google/go-cmp/cmp"
"google.golang.org/protobuf/internal/encoding/text"
"google.golang.org/protobuf/internal/flags"
)

View File

@ -11,6 +11,7 @@ import (
"unicode/utf8"
"github.com/google/go-cmp/cmp"
"google.golang.org/protobuf/internal/detrand"
"google.golang.org/protobuf/internal/encoding/text"
)

View File

@ -13,6 +13,7 @@ import (
"testing"
"github.com/google/go-cmp/cmp"
detrand "google.golang.org/protobuf/internal/detrand"
"google.golang.org/protobuf/internal/filedesc"
"google.golang.org/protobuf/proto"

View File

@ -9,6 +9,7 @@ import (
"testing"
"github.com/google/go-cmp/cmp"
"google.golang.org/protobuf/proto"
pref "google.golang.org/protobuf/reflect/protoreflect"

View File

@ -11,6 +11,7 @@ import (
"testing"
"github.com/google/go-cmp/cmp"
"google.golang.org/protobuf/encoding/prototext"
"google.golang.org/protobuf/internal/impl"
"google.golang.org/protobuf/reflect/protodesc"

View File

@ -12,6 +12,7 @@ import (
"testing"
"github.com/google/go-cmp/cmp"
"google.golang.org/protobuf/internal/impl"
"google.golang.org/protobuf/internal/pragma"
"google.golang.org/protobuf/proto"

View File

@ -12,6 +12,7 @@ import (
"github.com/google/go-cmp/cmp"
"github.com/google/go-cmp/cmp/cmpopts"
"google.golang.org/protobuf/encoding/prototext"
pimpl "google.golang.org/protobuf/internal/impl"
"google.golang.org/protobuf/internal/pragma"

View File

@ -15,6 +15,7 @@ import (
cmp "github.com/google/go-cmp/cmp"
cmpopts "github.com/google/go-cmp/cmp/cmpopts"
"google.golang.org/protobuf/encoding/prototext"
pimpl "google.golang.org/protobuf/internal/impl"
"google.golang.org/protobuf/proto"

View File

@ -98,7 +98,6 @@ func (template Message) Build(m pref.Message) {
v.(Message).Build(m.Mutable(fd).Message())
}
}
}
}

View File

@ -12,6 +12,7 @@ import (
"testing"
"github.com/google/go-cmp/cmp"
"google.golang.org/protobuf/encoding/prototext"
"google.golang.org/protobuf/internal/encoding/wire"
"google.golang.org/protobuf/proto"

View File

@ -10,6 +10,7 @@ import (
"testing"
"github.com/google/go-cmp/cmp"
"google.golang.org/protobuf/proto"
pref "google.golang.org/protobuf/reflect/protoreflect"
"google.golang.org/protobuf/runtime/protoimpl"
@ -64,7 +65,6 @@ func TestExtensionFuncs(t *testing.T) {
if proto.HasExtension(test.message, test.ext) {
t.Errorf("%v:\nafter clearing extension HasExtension(...) = true, want false", desc)
}
}
}

View File

@ -11,6 +11,7 @@ import (
"testing"
"github.com/google/go-cmp/cmp"
"google.golang.org/protobuf/encoding/prototext"
"google.golang.org/protobuf/internal/encoding/pack"
"google.golang.org/protobuf/internal/protobuild"
@ -645,7 +646,6 @@ func TestMerge(t *testing.T) {
if !proto.Equal(dst, want) {
t.Fatalf("mutation observed after modifying source:\n got %v\nwant %v\ndiff (-want,+got):\n%v", dst, want, cmp.Diff(want, dst, protocmp.Transform()))
}
})
}
}

View File

@ -10,10 +10,11 @@ import (
"github.com/google/go-cmp/cmp"
"google.golang.org/protobuf/internal/encoding/pack"
testpb "google.golang.org/protobuf/internal/testprotos/test"
"google.golang.org/protobuf/proto"
"google.golang.org/protobuf/reflect/protoreflect"
"google.golang.org/protobuf/types/dynamicpb"
testpb "google.golang.org/protobuf/internal/testprotos/test"
)
func TestEqual(t *testing.T) {