diff --git a/.golangci.yaml b/.golangci.yaml index 0afea8c2..6c5d550f 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -7,13 +7,14 @@ linters: - revive - gosec - prealloc -run: - skip-files: +issues: + exclude-files: - /zz_generated_ - _generated - skip-dirs: + exclude-dirs: - generated - deadline: 5m +run: + timeout: 5m tests: true build-tags: - test diff --git a/go.mod b/go.mod index 6144fa35..77dfe1bd 100644 --- a/go.mod +++ b/go.mod @@ -47,7 +47,6 @@ require ( github.com/stretchr/testify v1.8.2 github.com/urfave/cli/v2 v2.3.0 golang.org/x/crypto v0.17.0 - golang.org/x/exp v0.0.0-20231219180239-dc181d75b848 k8s.io/api v0.27.1 k8s.io/apimachinery v0.27.1 k8s.io/client-go v0.27.1 @@ -98,6 +97,7 @@ require ( github.com/prometheus/common v0.42.0 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/spf13/pflag v1.0.5 // indirect + golang.org/x/exp v0.0.0-20231219180239-dc181d75b848 // indirect golang.org/x/mod v0.14.0 // indirect golang.org/x/net v0.19.0 // indirect golang.org/x/oauth2 v0.13.0 // indirect diff --git a/pkg/controller/blockdevice/controller.go b/pkg/controller/blockdevice/controller.go index 51cc1d6a..ab8e09ab 100644 --- a/pkg/controller/blockdevice/controller.go +++ b/pkg/controller/blockdevice/controller.go @@ -7,6 +7,7 @@ import ( "os" "path/filepath" "reflect" + "slices" "sync" "time" @@ -14,7 +15,6 @@ import ( ghwutil "github.com/jaypipes/ghw/pkg/util" longhornv1 "github.com/longhorn/longhorn-manager/k8s/pkg/apis/longhorn/v1beta2" "github.com/sirupsen/logrus" - "golang.org/x/exp/slices" corev1 "k8s.io/api/core/v1" apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"