func (s exampleNamespaceLister) Get(name string) (*v1.Example, error) {
	obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
	if err != nil {
		return nil, err
	}
	if !exists {
		return nil, errors.NewNotFound(v1.Resource("example"), name)
	}
	return obj.(*v1.Example), nil
}
Get retrieves the Example from the indexer for a given namespace and name.
package v1
import (
	v1 "k8s.io/apiextensions-apiserver/examples/client-go/pkg/apis/cr/v1"
	"k8s.io/apimachinery/pkg/api/errors"
	"k8s.io/apimachinery/pkg/labels"
	"k8s.io/client-go/tools/cache"
)
type ExampleLister interface {
	List(selector labels.Selector) (ret []*v1.Example, err error)
	Examples(namespace string) ExampleNamespaceLister
	ExampleListerExpansion
}
type exampleLister struct {
	indexer cache.Indexer
}
func NewExampleLister(indexer cache.Indexer) ExampleLister {
	return &exampleLister{indexer: indexer}
}
func (s *exampleLister) List(selector labels.Selector) (ret []*v1.Example, err error) {
	err = cache.ListAll(s.indexer, selector, func(m interface{}) {
		ret = append(ret, m.(*v1.Example))
	})
	return ret, err
}
func (s *exampleLister) Examples(namespace string) ExampleNamespaceLister {
	return exampleNamespaceLister{indexer: s.indexer, namespace: namespace}
}
type ExampleNamespaceLister interface {
	List(selector labels.Selector) (ret []*v1.Example, err error)
	Get(name string) (*v1.Example, error)
	ExampleNamespaceListerExpansion
}
type exampleNamespaceLister struct {
	indexer   cache.Indexer
	namespace string
}
func (s exampleNamespaceLister) List(selector labels.Selector) (ret []*v1.Example, err error) {
	err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
		ret = append(ret, m.(*v1.Example))
	})
	return ret, err
}