fix golint failures of pkg/controller/namespace/deletion pkg/controller/serviceaccount
This commit is contained in:
@@ -37,11 +37,12 @@ import (
|
||||
v1clientset "k8s.io/client-go/kubernetes/typed/core/v1"
|
||||
)
|
||||
|
||||
// Interface to delete a namespace with all resources in it.
|
||||
// NamespacedResourcesDeleterInterface is the interface to delete a namespace with all resources in it.
|
||||
type NamespacedResourcesDeleterInterface interface {
|
||||
Delete(nsName string) error
|
||||
}
|
||||
|
||||
// NewNamespacedResourcesDeleter returns a new NamespacedResourcesDeleter.
|
||||
func NewNamespacedResourcesDeleter(nsClient v1clientset.NamespaceInterface,
|
||||
dynamicClient dynamic.Interface, podsGetter v1clientset.PodsGetter,
|
||||
discoverResourcesFn func() ([]*metav1.APIResourceList, error),
|
||||
|
@@ -213,7 +213,7 @@ func TestRetryOnConflictError(t *testing.T) {
|
||||
retryOnce := func(namespace *v1.Namespace) (*v1.Namespace, error) {
|
||||
numTries++
|
||||
if numTries <= 1 {
|
||||
return namespace, errors.NewConflict(api.Resource("namespaces"), namespace.Name, fmt.Errorf("ERROR!"))
|
||||
return namespace, errors.NewConflict(api.Resource("namespaces"), namespace.Name, fmt.Errorf("ERROR"))
|
||||
}
|
||||
return namespace, nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user