upgrade actions and golangci-lint #7
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces several improvements and refactorings to error handling, logging, and workflow configuration. The most significant changes include centralizing error definitions, improving resource management with a utility function, enhancing logging with structured logs, and updating GitHub Actions workflows and linting configuration for better maintainability and security.
Error handling and logging improvements:
cmd/errors.gofile to centralize error definitions, such asErrInvalidArgsandErrNoTables, and refactored error handling incmd/invalidate.goto use these custom errors withfmt.Errorfand error wrapping. [1] [2] [3]fmt.Printlnandfmt.Printfwith structured logging usinglog/sloginusecase/list_tables.goandusecase/update_table_expiration.go. [1] [2] [3] [4]util.CloseWithLogto handle resource closing with error logging, and updated usages in bothusecase/list_tables.goandusecase/update_table_expiration.go. [1] [2] [3]Workflow and linting configuration updates:
ubuntu-slimfor the release job, and improved Go version management by usinggo-version-file. [1] [2].golangci.ymlto explicitly set the linter version, disable default linters, and enable a curated set of linters for improved code quality and consistency.