Skip to content

Commit

Permalink
Switch to google.golang.org/protobuf
Browse files Browse the repository at this point in the history
This fixes warnings like this one:

> main.go:12:2: SA1019: package github.com/golang/protobuf/proto is deprecated: Use the "google.golang.org/protobuf/proto" package instead. (staticcheck)
> 	"github.com/golang/protobuf/proto"
> 	^

(and there's no functional or API change as far as I can see).

Note that github.org/google/protobuf is still there in go.mod
as it is used by the .pb.go files. Apparently it is there only to ensure
backward compatibility with something like:

> import proto "github.com/golang/protobuf/proto"
> // This is a compile-time assertion that a sufficiently up-to-date version
> // of the legacy proto package is being used.
> const _ = proto.ProtoPackageIsVersion4

Signed-off-by: Kir Kolyshkin <[email protected]>
  • Loading branch information
kolyshkin committed Feb 16, 2021
1 parent c4ae3a7 commit d55357e
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"syscall"

"github.com/checkpoint-restore/go-criu/v4/rpc"
"github.com/golang/protobuf/proto"
"google.golang.org/protobuf/proto"
)

// Criu struct
Expand Down
2 changes: 1 addition & 1 deletion phaul/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"github.com/checkpoint-restore/go-criu/v4"
"github.com/checkpoint-restore/go-criu/v4/rpc"
"github.com/checkpoint-restore/go-criu/v4/stats"
"github.com/golang/protobuf/proto"
"google.golang.org/protobuf/proto"
)

const minPagesWritten uint64 = 64
Expand Down
2 changes: 1 addition & 1 deletion phaul/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (

"github.com/checkpoint-restore/go-criu/v4"
"github.com/checkpoint-restore/go-criu/v4/rpc"
"github.com/golang/protobuf/proto"
"golang.org/x/sys/unix"
"google.golang.org/protobuf/proto"
)

// Server struct
Expand Down
2 changes: 1 addition & 1 deletion phaul/stats.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"os"

"github.com/checkpoint-restore/go-criu/v4/stats"
"github.com/golang/protobuf/proto"
"google.golang.org/protobuf/proto"
)

/* FIXME: report stats from CriuResp */
Expand Down
2 changes: 1 addition & 1 deletion test/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (

"github.com/checkpoint-restore/go-criu/v4"
"github.com/checkpoint-restore/go-criu/v4/rpc"
"github.com/golang/protobuf/proto"
"google.golang.org/protobuf/proto"
)

// TestNfy struct
Expand Down
2 changes: 1 addition & 1 deletion test/phaul/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"github.com/checkpoint-restore/go-criu/v4"
"github.com/checkpoint-restore/go-criu/v4/phaul"
"github.com/checkpoint-restore/go-criu/v4/rpc"
"github.com/golang/protobuf/proto"
"google.golang.org/protobuf/proto"
)

type testLocal struct {
Expand Down

0 comments on commit d55357e

Please sign in to comment.