1
0
mirror of https://github.com/rancher/norman.git synced 2025-07-31 23:00:43 +00:00

Fix imports

This commit is contained in:
Darren Shepherd 2017-11-28 15:08:31 -07:00
parent 738a3ab397
commit 9ae8c8e1a7
2 changed files with 7 additions and 3 deletions

View File

@ -8,12 +8,12 @@ import (
{{.importPackage}}
"github.com/rancher/norman/clientbase"
"github.com/rancher/norman/controller"
"k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/label"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/apimachinery/pkg/watch"
"k8s.io/client-go/rest"
"k8s.io/client-go/tools/cache"
)
@ -86,7 +86,10 @@ func (l *{{.schema.ID}}Lister) Get(namespace, name string) (*{{.prefix}}{{.schem
return nil, err
}
if !exists {
return nil, errors.NewNotFound(v1.Resource("{{.schema.ID}}"), name)
return nil, errors.NewNotFound(schema.GroupResource{
Group: {{.schema.CodeName}}GroupVersionKind.Group,
Resource: "{{.schema.ID}}",
}, name)
}
return obj.(*{{.prefix}}{{.schema.CodeName}}), nil
}

View File

@ -4,6 +4,7 @@ var k8sClientTemplate = `package {{.version.Version}}
import (
"sync"
"context"
"github.com/rancher/norman/clientbase"
"github.com/rancher/norman/controller"