From fd33dcb97ba860ff457e304559a7890a2f3bf3af Mon Sep 17 00:00:00 2001 From: houseme Date: Thu, 19 Sep 2024 10:38:20 +0800 Subject: [PATCH] ci: add go version 1.23 support (#3733) --- .github/workflows/ci-main.yml | 2 +- .github/workflows/ci-sub.yml | 2 +- .github/workflows/golangci-lint.yml | 4 ++-- database/gredis/gredis_redis.go | 8 +------- 4 files changed, 5 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci-main.yml b/.github/workflows/ci-main.yml index af366b931..df0ef1473 100644 --- a/.github/workflows/ci-main.yml +++ b/.github/workflows/ci-main.yml @@ -185,7 +185,7 @@ jobs: strategy: matrix: - go-version: [ "1.18", "1.19", "1.20", "1.21", "1.22" ] + go-version: [ "1.18", "1.19", "1.20", "1.21", "1.22", "1.23" ] goarch: [ "386", "amd64" ] steps: diff --git a/.github/workflows/ci-sub.yml b/.github/workflows/ci-sub.yml index ed2b46b45..c60621a45 100644 --- a/.github/workflows/ci-sub.yml +++ b/.github/workflows/ci-sub.yml @@ -37,7 +37,7 @@ jobs: strategy: matrix: - go-version: [ "1.18", "1.19", "1.20", "1.22" ] + go-version: [ "1.18", "1.19", "1.20", "1.22", "1.23" ] goarch: [ "386", "amd64" ] steps: diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index ade760534..afef2b6b3 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -36,7 +36,7 @@ jobs: golangci: strategy: matrix: - go-version: [ '1.18','1.19','1.20','1.21.4','1.22' ] + go-version: [ '1.18','1.19','1.20','1.21.4','1.22','1.23' ] name: golangci-lint runs-on: ubuntu-latest steps: @@ -50,5 +50,5 @@ jobs: uses: golangci/golangci-lint-action@v6 with: # Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version. - version: v1.58.2 + version: v1.60.1 args: --timeout 3m0s diff --git a/database/gredis/gredis_redis.go b/database/gredis/gredis_redis.go index 04d72b472..5b24be32d 100644 --- a/database/gredis/gredis_redis.go +++ b/database/gredis/gredis_redis.go @@ -12,7 +12,6 @@ import ( "github.com/gogf/gf/v2/container/gvar" "github.com/gogf/gf/v2/errors/gcode" "github.com/gogf/gf/v2/errors/gerror" - "github.com/gogf/gf/v2/text/gstr" ) // Redis client. @@ -48,12 +47,7 @@ const ( errorNilRedis = `the Redis object is nil` ) -var ( - errorNilAdapter = gstr.Trim(gstr.Replace(` -redis adapter is not set, missing configuration or adapter register? -possible reference: https://github.com/gogf/gf/tree/master/contrib/nosql/redis -`, "\n", "")) -) +const errorNilAdapter = `redis adapter is not set, missing configuration or adapter register? possible reference: https://github.com/gogf/gf/tree/master/contrib/nosql/redis` // initGroup initializes the group object of redis. func (r *Redis) initGroup() *Redis {