mirror of
https://github.com/rancher/norman.git
synced 2025-09-01 15:18:20 +00:00
Fix golangci-lint issues
As part of updating dapper files, golangci-lint was set to be used. This caused a lot of lint issues to crop up, which this fixes.
This commit is contained in:
@@ -2,13 +2,10 @@ package controller
|
||||
|
||||
import (
|
||||
"context"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
errors2 "github.com/pkg/errors"
|
||||
"github.com/rancher/lasso/pkg/controller"
|
||||
"github.com/sirupsen/logrus"
|
||||
"k8s.io/apimachinery/pkg/api/errors"
|
||||
"k8s.io/apimachinery/pkg/api/meta"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/client-go/tools/cache"
|
||||
@@ -78,20 +75,3 @@ func isNamespace(namespace string, obj runtime.Object) bool {
|
||||
}
|
||||
return meta.GetNamespace() == namespace
|
||||
}
|
||||
|
||||
func ignoreError(err error, checkString bool) bool {
|
||||
err = errors2.Cause(err)
|
||||
if errors.IsConflict(err) {
|
||||
return true
|
||||
}
|
||||
if err == controller.ErrIgnore {
|
||||
return true
|
||||
}
|
||||
if _, ok := err.(*ForgetError); ok {
|
||||
return true
|
||||
}
|
||||
if checkString {
|
||||
return strings.HasSuffix(err.Error(), "please apply your changes to the latest version and try again")
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
Reference in New Issue
Block a user