chore: bump minimum Go version to 1.24 and update workflows (#4388)
Before adoption: this commit came in with the history the project adopted, so no landing records it.
- Update minimum required Go version from 1.23 to 1.24 throughout documentation, warnings, and tests - Remove Go 1.23 from the GitHub Actions workflow matrix - Change single quotes to double quotes for consistency in workflow configuration
authored by Bo-Yi Wu · committed by GitHub · parent 48a5dca · Browse files · 5 files·+12 added−12 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Trailers
- Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
Diff stats
5 files+12 added−12 removed
- other:+12 added−12 removed
Provenance
- Commit
5dd833f- Tree
6b0aa59- Author
Bo-Yi Wu <appleboy.tw@gmail.com>- Committer
GitHub <noreply@github.com>- Parent
48a5dca
5 files changed+12 added−12 removed
modified:.github/workflows/gin.yml+5 added-5 removed
31 unmodified lines3233343536363738394050 unmodified lines9192939495959697989997989931 unmodified lines needs: lint strategy: matrix: os: [ubuntu-latest, macos-latest] go: ["1.23", "1.24", "1.25"] go: ["1.24", "1.25"] test-tags: [ "", "-tags nomsgpack",50 unmodified lines
- name: Run Trivy vulnerability scanner in repo mode uses: aquasecurity/trivy-action@0.33.1 with: scan-type: 'fs' scan-type: "fs" ignore-unfixed: true format: 'table' exit-code: '1' severity: 'CRITICAL,HIGH,MEDIUM' format: "table" exit-code: "1" severity: "CRITICAL,HIGH,MEDIUM"modified:context_test.go+4 added-4 removed
3318 unmodified lines3319 assert.Contains(t, setCookie, "Domain=localhost")3320 assert.Contains(t, setCookie, "Max-Age=1")3321 assert.Contains(t, setCookie, "HttpOnly")3322 assert.Contains(t, setCookie, "Secure")3323- // SameSite=Lax might be omitted in Go 1.23+ as it's the default3323+ // SameSite=Lax might be omitted in Go 1.24+ as it's the default3324 // assert.Contains(t, setCookie, "SameSite=Lax")3325 3326 // Test that when Path is empty, "/" is automatically set3327 cookie = &http.Cookie{12 unmodified lines3340 assert.Contains(t, setCookie, "Domain=localhost")3341 assert.Contains(t, setCookie, "Max-Age=1")3342 assert.Contains(t, setCookie, "HttpOnly")3343 assert.Contains(t, setCookie, "Secure")3344- // SameSite=Lax might be omitted in Go 1.23+ as it's the default3344+ // SameSite=Lax might be omitted in Go 1.24+ as it's the default3345 // assert.Contains(t, setCookie, "SameSite=Lax")3346 3347 // Test additional cookie attributes (Expires)3348 expireTime := time.Now().Add(24 * time.Hour)14 unmodified lines3363 assert.Contains(t, setCookie, "Path=/")3364 assert.Contains(t, setCookie, "Domain=localhost")3365 assert.Contains(t, setCookie, "HttpOnly")3366 assert.Contains(t, setCookie, "Secure")3367- // SameSite=Lax might be omitted in Go 1.23+ as it's the default3367+ // SameSite=Lax might be omitted in Go 1.24+ as it's the default3368 // assert.Contains(t, setCookie, "SameSite=Lax")3369 3370 // Test for Partitioned attribute (Go 1.18+)3371 cookie = &http.Cookie{11 unmodified lines3383 assert.Contains(t, setCookie, "Path=/")3384 assert.Contains(t, setCookie, "Domain=localhost")3385 assert.Contains(t, setCookie, "HttpOnly")3386 assert.Contains(t, setCookie, "Secure")3387- // SameSite=Lax might be omitted in Go 1.23+ as it's the default3387+ // SameSite=Lax might be omitted in Go 1.24+ as it's the default3388 // assert.Contains(t, setCookie, "SameSite=Lax")3389 // Not testing for Partitioned attribute as it may not be supported in all Go versions3390 3391 // Test that SameSiteStrictMode is explicitly included in the header249 unmodified linesmodified:debug_test.go+1 added-1 removed
104 unmodified lines105 SetMode(TestMode)106 })107 m, e := getMinVer(runtime.Version())108 if e == nil && m < ginSupportMinGoVer {109- assert.Equal(t, "[GIN-debug] [WARNING] Now Gin requires Go 1.23+.\n\n[GIN-debug] [WARNING] Creating an Engine instance with the Logger and Recovery middleware already attached.\n\n", re)109+ assert.Equal(t, "[GIN-debug] [WARNING] Now Gin requires Go 1.24+.\n\n[GIN-debug] [WARNING] Creating an Engine instance with the Logger and Recovery middleware already attached.\n\n", re)110 } else {111 assert.Equal(t, "[GIN-debug] [WARNING] Creating an Engine instance with the Logger and Recovery middleware already attached.\n\n", re)112 }113 }55 unmodified linesmodified:debug.go+1 added-1 removed
76 unmodified lines77 }78 79 func debugPrintWARNINGDefault() {80 if v, e := getMinVer(runtime.Version()); e == nil && v < ginSupportMinGoVer {81- debugPrint(`[WARNING] Now Gin requires Go 1.23+.81+ debugPrint(`[WARNING] Now Gin requires Go 1.24+.82 83 `)84 }85 debugPrint(`[WARNING] Creating an Engine instance with the Logger and Recovery middleware already attached.27 unmodified linesmodified:README.md+1 added-1 removed
41 unmodified lines42 ## Getting Started43 44 ### Prerequisites45 46-- **Go version**: Gin requires [Go](https://go.dev/) version [1.23](https://go.dev/doc/devel/release#go1.23.0) or above46+- **Go version**: Gin requires [Go](https://go.dev/) version [1.24](https://go.dev/doc/devel/release#go1.24.0) or above47 - **Basic Go knowledge**: Familiarity with Go syntax and package management is helpful48 49 ### Installation50 174 unmodified lines