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:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user