diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 35a8ae1a9..5b25dfe8b 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -47,7 +47,9 @@ jobs: ;; esac - name: golangci-lint - uses: golangci/golangci-lint-action@08e2f20817b15149a52b5b3ebe7de50aff2ba8c5 # v3.4.0 + uses: golangci/golangci-lint-action@aaa42aa0628b4ae2578232a66b541047968fac86 # v6.1.0 + with: + version: v1.60.1 test-windows: strategy: @@ -86,7 +88,9 @@ jobs: esac shell: bash - name: golangci-lint - uses: golangci/golangci-lint-action@08e2f20817b15149a52b5b3ebe7de50aff2ba8c5 # v3.4.0 + uses: golangci/golangci-lint-action@aaa42aa0628b4ae2578232a66b541047968fac86 # v6.1.0 + with: + version: v1.60.1 coverage: needs: ["test-linux", "test-windows"] diff --git a/.go-version b/.go-version index 0c5bf37ca..013173af5 100644 --- a/.go-version +++ b/.go-version @@ -1 +1 @@ -1.21.13 +1.22.6 diff --git a/db.go b/db.go index e8a2d1c29..822798e41 100644 --- a/db.go +++ b/db.go @@ -524,7 +524,7 @@ func (db *DB) munmap() error { // gofail: var unmapError string // return errors.New(unmapError) if err := munmap(db); err != nil { - return fmt.Errorf("unmap error: " + err.Error()) + return fmt.Errorf("unmap error: %v", err.Error()) } return nil @@ -571,7 +571,7 @@ func (db *DB) munlock(fileSize int) error { // gofail: var munlockError string // return errors.New(munlockError) if err := munlock(db, fileSize); err != nil { - return fmt.Errorf("munlock error: " + err.Error()) + return fmt.Errorf("munlock error: %v", err.Error()) } return nil } @@ -580,7 +580,7 @@ func (db *DB) mlock(fileSize int) error { // gofail: var mlockError string // return errors.New(mlockError) if err := mlock(db, fileSize); err != nil { - return fmt.Errorf("mlock error: " + err.Error()) + return fmt.Errorf("mlock error: %v", err.Error()) } return nil } diff --git a/go.mod b/go.mod index 81363a7e5..2ba506a85 100644 --- a/go.mod +++ b/go.mod @@ -1,8 +1,8 @@ module go.etcd.io/bbolt -go 1.21 +go 1.22 -toolchain go1.21.13 +toolchain go1.22.6 require ( github.com/stretchr/testify v1.8.1