go: module github.com/golang/protobuf is deprecated: Use the "google.golang.org/protobuf" module instead.
- Update the Import Paths
Replace all occurrences of github.com/golang/protobuf with google.golang.org/protobuf
- Update the Go Modules
Replace the dependency on github.com/golang/protobuf with google.golang.org/protobuf:
- Update Code References
The google.golang.org/protobuf package has some changes compared to github.com/golang/protobuf. For example:
proto.Message is now an interface, not a struct.
- Methods like
proto.Marshal, proto.Unmarshal, and proto.Equal are now in google.golang.org/protobuf/proto.
Replace all occurrences of github.com/golang/protobuf with google.golang.org/protobuf
Replace the dependency on github.com/golang/protobuf with google.golang.org/protobuf:
The
google.golang.org/protobufpackage has some changes compared togithub.com/golang/protobuf. For example:proto.Messageis now an interface, not a struct.proto.Marshal,proto.Unmarshal, andproto.Equalare now ingoogle.golang.org/protobuf/proto.