fix golint failures of pkg/controller/namespace/deletion pkg/controller/serviceaccount

This commit is contained in:
SataQiu
2019-05-23 12:09:01 +08:00
parent 585fa3acc8
commit b87d006a50
5 changed files with 6 additions and 5 deletions

View File

@@ -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),

View File

@@ -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
}