Skip to content

Conversation

@to-lz1
Copy link
Owner

@to-lz1 to-lz1 commented Jan 27, 2026

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:

  • Introduced a new cmd/errors.go file to centralize error definitions, such as ErrInvalidArgs and ErrNoTables, and refactored error handling in cmd/invalidate.go to use these custom errors with fmt.Errorf and error wrapping. [1] [2] [3]
  • Replaced direct calls to fmt.Println and fmt.Printf with structured logging using log/slog in usecase/list_tables.go and usecase/update_table_expiration.go. [1] [2] [3] [4]
  • Added a new utility function util.CloseWithLog to handle resource closing with error logging, and updated usages in both usecase/list_tables.go and usecase/update_table_expiration.go. [1] [2] [3]

Workflow and linting configuration updates:

  • Updated GitHub Actions workflow files to use specific commit SHAs for actions, upgraded action versions, switched to ubuntu-slim for the release job, and improved Go version management by using go-version-file. [1] [2]
  • Overhauled .golangci.yml to explicitly set the linter version, disable default linters, and enable a curated set of linters for improved code quality and consistency.

@to-lz1 to-lz1 force-pushed the chore/upgrade_go_1_25_6 branch from 3a56d89 to c043d75 Compare January 27, 2026 02:17
@to-lz1 to-lz1 changed the title upgrade actions upgrade actions and golangci-lint Jan 27, 2026
@to-lz1 to-lz1 merged commit 40767a7 into main Jan 27, 2026
1 check passed
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