Use proto.Marshal instead of calling Marshal() on objects
With google.golang.org/protobuf, proto-generated objects only have ProtoReflect(). They don't have Marshal() anymore (see #6564). Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
This commit is contained in:
@@ -42,6 +42,7 @@ import (
|
||||
"github.com/containerd/containerd/pkg/timeout"
|
||||
"github.com/containerd/containerd/plugin"
|
||||
"github.com/containerd/containerd/protobuf"
|
||||
"github.com/containerd/containerd/protobuf/proto"
|
||||
ptypes "github.com/containerd/containerd/protobuf/types"
|
||||
"github.com/containerd/containerd/runtime"
|
||||
"github.com/containerd/containerd/runtime/linux/runctypes"
|
||||
@@ -579,7 +580,8 @@ func (l *local) Checkpoint(ctx context.Context, r *api.CheckpointTaskRequest, _
|
||||
return nil, err
|
||||
}
|
||||
// write the config to the content store
|
||||
data, err := protobuf.FromAny(container.Spec).Marshal()
|
||||
pbany := protobuf.FromAny(container.Spec)
|
||||
data, err := proto.Marshal(pbany)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user