diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index c344342..0303513 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -20,11 +20,11 @@ jobs: - name: Set up Go uses: actions/setup-go@v3 with: - go-version: 1.19 + go-version: 1.21 - name: lint run: | - curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.52.0 + curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.55.2 ./bin/golangci-lint run - name: Build diff --git a/.golangci.yaml b/.golangci.yaml index 82fbfe3..153b2dc 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 \ No newline at end of file + - test diff --git a/go.mod b/go.mod index b3ada28..bc9fe71 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/harvester/go-common -go 1.20 +go 1.21 require ( github.com/coreos/go-systemd/v22 v22.5.0 @@ -8,7 +8,6 @@ require ( github.com/godbus/dbus/v5 v5.0.4 github.com/sirupsen/logrus v1.9.2 github.com/stretchr/testify v1.7.0 - golang.org/x/exp v0.0.0-20231206192017-f3f8817b8deb gopkg.in/yaml.v3 v3.0.1 ) diff --git a/go.sum b/go.sum index 1d758d3..aa265da 100644 --- a/go.sum +++ b/go.sum @@ -14,8 +14,6 @@ github.com/sirupsen/logrus v1.9.2/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVs github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -golang.org/x/exp v0.0.0-20231206192017-f3f8817b8deb h1:c0vyKkb6yr3KR7jEfJaOSv4lG7xPkbN6r52aJz1d8a8= -golang.org/x/exp v0.0.0-20231206192017-f3f8817b8deb/go.mod h1:iRJReGqOEeBhDZGkGbynYwcHlctCvnjTYIamk7uXpHI= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220908164124-27713097b956 h1:XeJjHH1KiLpKGb6lvMiksZ9l0fVUh+AmGcm0nOMEBOY= golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= diff --git a/slice.go b/slice.go index 8e734cf..a9df4c1 100644 --- a/slice.go +++ b/slice.go @@ -1,6 +1,6 @@ package gocommon -import "golang.org/x/exp/slices" +import "slices" // SliceContentCmp compares two slices and returns true if they have the same content with any order. func SliceContentCmp[T comparable](x, y []T) bool {