Use typeurl.Any instead of github.com/gogo/protobuf/types.Any
This commit upgrades github.com/containerd/typeurl to use typeurl.Any. The interface hides gogo/protobuf/types.Any from containerd's Go client. Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
This commit is contained in:
@@ -49,12 +49,14 @@ func NewContainer(ctx context.Context, platform stdio.Platform, r *task.CreateTa
|
||||
}
|
||||
|
||||
var opts options.Options
|
||||
if r.Options != nil && r.Options.GetTypeUrl() != "" {
|
||||
if r.Options.GetValue() != nil {
|
||||
v, err := typeurl.UnmarshalAny(r.Options)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
opts = *v.(*options.Options)
|
||||
if v != nil {
|
||||
opts = *v.(*options.Options)
|
||||
}
|
||||
}
|
||||
|
||||
var mounts []process.Mount
|
||||
|
||||
Reference in New Issue
Block a user