Skip to content

Conversation

@aws-gopher
Copy link
Owner

Update tests for go1.23

  • Extract func testContext(t *testing.T) context.Context with two different implementations. g1.24 and above will continue to use (*testing.T).Context as before, while go1.23 gets a hand-rolled approximation.
  • Update all callsites of (*testing.T).Context to use testContext instead.
  • Once the module Go version is updated to go1.24 or later, this change can be reversed.

CI Changes:

  • Use matrix strategy to test go1.23, go1.24, go1.25
  • Adds go vet for linting
  • Adds staticcheck for static analysis
  • Only trigger CI on PR events

- Adds `go vet` for linting
- Adds `staticcheck` for static analysis
- Extract `func testContext(t *testing.T) context.Context` with two different implementations. g1.24 and above will continue to use `(*testing.T).Context` as before, while go1.23 gets a hand-rolled approximation.
- Update all callsites of `(*testing.T).Context` to use `testContext` instead.
- Once the module Go version is updated to go1.24 or later, this change can be reversed.
@aws-gopher aws-gopher merged commit 0a10cde into main Aug 22, 2025
3 checks passed
@aws-gopher aws-gopher deleted the support-go1.23 branch August 22, 2025 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants