You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor(tests): min go 1.23, golangci-lint 2.5.0, linter advices (#31)
This pull request introduces a series of updates and improvements to the
codebase, focusing on dependency updates, testing enhancements, and
general code hygiene.
### CI/CD
- **Go Version:** The Go version used in the CI workflow has been
upgraded f om `1.22` to `1.23`. This allows us to leverage the latest
features and improvements in the Go language.
- **golangci-lint:** The version of `golangci-lint` has been updated
from `v2.1.6` to `v2.5.0`. This brings in new linting rules and bug
fixes, helping to improve code quality.
### Testing
- **Context Handling:** In the test files, all instances of
`context.Background()` have been replaced with `t.Context()`. This is a
significant improvement in our testing practices. `t.Context()` provides
a context that is automatically canceled when the test or subtest
completes, preventing resource leaks from dangling goroutines and making
the tests more robust.
- **Test Assertion Fix:** A bug in the `TestUpdate` function within
`client_test.go` has been resolved. Previously, the `originalComment`
and `changedComment` variables were identical, meaning the test was not
correctly verifying the update functionality. This has been corrected to
ensure the test is effective.
- **Loop Variable Handling:** The `//nolint:copyloopvar` directive has
been removed from the `TestConflict` function. This is now possible due
to the improved handling of loop variables in Go `1.22` and later.
### Other Changes
- **Go Module:** The `go.mod` file has been updated to reflect the new
Go version (`1.23.0`) and the `toolchain` directive has been removed.
- **Code Formatting:** Various minor code formatting adjustments have
been made throughout the codebase to improve readability and maintain
consistency.
- **Documentation:** A minor typo in a function comment in
`listzones.go` has been corrected.
0 commit comments