diff --git a/errors.go b/plugin/errors.go similarity index 93% rename from errors.go rename to plugin/errors.go index 7610e1217..60d5203ee 100644 --- a/errors.go +++ b/plugin/errors.go @@ -1,4 +1,4 @@ -package containerd +package plugin import "errors" diff --git a/services/execution/service.go b/services/execution/service.go index 6652d43b0..884925247 100644 --- a/services/execution/service.go +++ b/services/execution/service.go @@ -84,7 +84,7 @@ func (s *Service) Create(ctx context.Context, r *api.CreateRequest) (*api.Create s.mu.Lock() if _, ok := s.containers[r.ID]; ok { s.mu.Unlock() - return nil, containerd.ErrContainerExists + return nil, plugin.ErrContainerExists } c, err := runtime.Create(ctx, r.ID, opts) if err != nil { @@ -286,7 +286,7 @@ func (s *Service) getContainer(id string) (plugin.Container, error) { c, ok := s.containers[id] s.mu.Unlock() if !ok { - return nil, containerd.ErrContainerNotExist + return nil, plugin.ErrContainerNotExist } return c, nil } @@ -294,7 +294,7 @@ func (s *Service) getContainer(id string) (plugin.Container, error) { func (s *Service) getRuntime(name string) (plugin.Runtime, error) { runtime, ok := s.runtimes[name] if !ok { - return nil, containerd.ErrUnknownRuntime + return nil, plugin.ErrUnknownRuntime } return runtime, nil }