Skip to content

Commit

Permalink
fix: replace use of github.com/golang/protobuf/proto where possible (#…
Browse files Browse the repository at this point in the history
…1557)

This is basically b9f8777 but removing changes that were from generated files.

Updates: #1525
  • Loading branch information
codyoss authored Dec 4, 2024
1 parent 7fcd903 commit 0215dd6
Show file tree
Hide file tree
Showing 15 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion server/services/echo_service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import (
"testing"
"time"

"github.com/golang/protobuf/proto"
"github.com/golang/protobuf/ptypes"
durpb "github.com/golang/protobuf/ptypes/duration"
pb "github.com/googleapis/gapic-showcase/server/genproto"
Expand All @@ -34,6 +33,7 @@ import (
"google.golang.org/grpc/codes"
"google.golang.org/grpc/metadata"
"google.golang.org/grpc/status"
"google.golang.org/protobuf/proto"
durationpb "google.golang.org/protobuf/types/known/durationpb"
)

Expand Down
2 changes: 1 addition & 1 deletion server/services/iam_policy_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ import (
"sync"

iampb "cloud.google.com/go/iam/apiv1/iampb"
"github.com/golang/protobuf/proto"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
"google.golang.org/protobuf/proto"
)

var missingResource error = status.Error(codes.InvalidArgument, "Missing required argument: resource")
Expand Down
2 changes: 1 addition & 1 deletion server/services/identity_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ import (
"fmt"
"sync"

"github.com/golang/protobuf/proto"
"github.com/golang/protobuf/ptypes"
"github.com/golang/protobuf/ptypes/empty"
"github.com/googleapis/gapic-showcase/server"
pb "github.com/googleapis/gapic-showcase/server/genproto"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
"google.golang.org/protobuf/proto"
)

// NewIdentityServer returns a new instance of showcase identity server.
Expand Down
2 changes: 1 addition & 1 deletion server/services/identity_service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ import (
"strings"
"testing"

"github.com/golang/protobuf/proto"
"github.com/google/go-cmp/cmp"
"github.com/googleapis/gapic-showcase/server"
pb "github.com/googleapis/gapic-showcase/server/genproto"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
"google.golang.org/protobuf/proto"
"google.golang.org/protobuf/types/known/fieldmaskpb"
)

Expand Down
2 changes: 1 addition & 1 deletion server/services/messaging_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ import (
"time"

"cloud.google.com/go/longrunning/autogen/longrunningpb"
"github.com/golang/protobuf/proto"
"github.com/golang/protobuf/ptypes"
"github.com/golang/protobuf/ptypes/empty"
"github.com/googleapis/gapic-showcase/server"
pb "github.com/googleapis/gapic-showcase/server/genproto"
errdetails "google.golang.org/genproto/googleapis/rpc/errdetails"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
"google.golang.org/protobuf/proto"
)

// NewMessagingServer returns an instance of a messaging server.
Expand Down
2 changes: 1 addition & 1 deletion server/services/messaging_service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import (
"testing"
"time"

"github.com/golang/protobuf/proto"
"github.com/golang/protobuf/ptypes"
"github.com/golang/protobuf/ptypes/timestamp"
"github.com/google/go-cmp/cmp"
Expand All @@ -33,6 +32,7 @@ import (
"golang.org/x/sync/errgroup"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
"google.golang.org/protobuf/proto"
"google.golang.org/protobuf/types/known/fieldmaskpb"
)

Expand Down
2 changes: 1 addition & 1 deletion server/services/operations_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ import (
"time"

lropb "cloud.google.com/go/longrunning/autogen/longrunningpb"
"github.com/golang/protobuf/proto"
"github.com/golang/protobuf/ptypes"
"github.com/golang/protobuf/ptypes/empty"
"github.com/googleapis/gapic-showcase/server"
pb "github.com/googleapis/gapic-showcase/server/genproto"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
"google.golang.org/protobuf/proto"
)

// NewOperationsServer returns a new OperationsServer for the Showcase API.
Expand Down
2 changes: 1 addition & 1 deletion server/services/operations_service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ import (
"time"

lropb "cloud.google.com/go/longrunning/autogen/longrunningpb"
"github.com/golang/protobuf/proto"
"github.com/golang/protobuf/ptypes"
"github.com/googleapis/gapic-showcase/server"
pb "github.com/googleapis/gapic-showcase/server/genproto"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
"google.golang.org/protobuf/proto"
)

func TestGetOperation_wait(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion server/services/testing_service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ import (
"encoding/base64"
"testing"

"github.com/golang/protobuf/proto"
"github.com/golang/protobuf/ptypes/empty"
"github.com/googleapis/gapic-showcase/server"
pb "github.com/googleapis/gapic-showcase/server/genproto"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
"google.golang.org/protobuf/proto"
)

func Test_Session_lifecycle(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion server/session_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ import (
"context"
"testing"

"github.com/golang/protobuf/proto"
pb "github.com/googleapis/gapic-showcase/server/genproto"
"google.golang.org/grpc"
"google.golang.org/protobuf/proto"
)

func TestSessionProto(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion server/spec/v1/unary.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ import (
"fmt"
"sync"

"github.com/golang/protobuf/proto"
"github.com/googleapis/gapic-showcase/server"
pb "github.com/googleapis/gapic-showcase/server/genproto"
"google.golang.org/grpc"
"google.golang.org/protobuf/proto"
)

type unaryTest struct {
Expand Down
2 changes: 1 addition & 1 deletion server/spec/v1/unary_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ import (
"context"
"testing"

"github.com/golang/protobuf/proto"
pb "github.com/googleapis/gapic-showcase/server/genproto"
"google.golang.org/grpc"
"google.golang.org/protobuf/proto"
)

func Test_unaryTest_GetName(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion server/waiter.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ import (
"time"

lropb "cloud.google.com/go/longrunning/autogen/longrunningpb"
"github.com/golang/protobuf/proto"
"github.com/golang/protobuf/ptypes"
pb "github.com/googleapis/gapic-showcase/server/genproto"
"google.golang.org/protobuf/proto"
)

var waiterSingleton Waiter = &waiterImpl{
Expand Down
2 changes: 1 addition & 1 deletion server/waiter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ import (
"time"

lropb "cloud.google.com/go/longrunning/autogen/longrunningpb"
"github.com/golang/protobuf/proto"
"github.com/golang/protobuf/ptypes"
"github.com/golang/protobuf/ptypes/timestamp"
pb "github.com/googleapis/gapic-showcase/server/genproto"
"google.golang.org/genproto/googleapis/rpc/status"
"google.golang.org/protobuf/proto"
)

func TestGetWaiterInstance(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion util/genrest/internal/pbinfo/pbinfo.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ import (
"strings"
"unicode"

"github.com/golang/protobuf/proto"
"github.com/golang/protobuf/protoc-gen-go/descriptor"
"google.golang.org/protobuf/proto"
)

// ProtoType represents a type in protobuf descriptors.
Expand Down

0 comments on commit 0215dd6

Please sign in to comment.