1
0
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:
Steffan Tucker
2022-07-11 16:38:47 -06:00
parent e8b47ab4c4
commit 1e41884a06
15 changed files with 25 additions and 45 deletions

View File

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