Use errdefs package

This commit is contained in:
Brian Goff
2019-05-20 14:11:13 -07:00
parent b9711abff3
commit 02623170cc
24 changed files with 93 additions and 72 deletions

View File

@@ -12,7 +12,7 @@ import (
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/service/cloudwatchlogs"
"github.com/aws/aws-sdk-go/service/ecs"
"github.com/cpuguy83/strongerrors"
"github.com/virtual-kubelet/virtual-kubelet/errdefs"
"github.com/virtual-kubelet/virtual-kubelet/vkubelet/api"
k8sTypes "k8s.io/apimachinery/pkg/types"
)
@@ -276,7 +276,7 @@ func (c *Cluster) GetPod(namespace string, name string) (*Pod, error) {
tag := buildTaskDefinitionTag(c.name, namespace, name)
pod, ok := c.pods[tag]
if !ok {
return nil, strongerrors.NotFound(fmt.Errorf("pod %s/%s is not found", namespace, name))
return nil, errdefs.NotFoundf("pod %s/%s is not found", namespace, name)
}
return pod, nil