Remove gogo/protobuf and adjust types

This commit migrates containerd/protobuf from github.com/gogo/protobuf
to google.golang.org/protobuf and adjust types. Proto-generated structs
cannot be passed as values.

Fixes #6564.

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
This commit is contained in:
Kazuyoshi Kato
2022-04-19 16:25:10 +00:00
parent fd37cc75be
commit e3db7de8f5
8 changed files with 44 additions and 53 deletions

View File

@@ -18,13 +18,13 @@
package proto
import (
gogo "github.com/gogo/protobuf/proto"
google "google.golang.org/protobuf/proto"
)
func Marshal(input gogo.Message) ([]byte, error) {
return gogo.Marshal(input)
func Marshal(input google.Message) ([]byte, error) {
return google.Marshal(input)
}
func Unmarshal(input []byte, output gogo.Message) error {
return gogo.Unmarshal(input, output)
func Unmarshal(input []byte, output google.Message) error {
return google.Unmarshal(input, output)
}