Conversation
Upgraded to Go 1.24 because it's always sunny in Golang-ville. Added a check before uploading coverage—let's not send empty files to the party!
Introduces a simple, atomic counter suited for testing scenarios with concurrency in mind.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 1 2 +1
Lines 52 102 +50
=========================================
+ Hits 52 102 +50
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Updated the README to feature a more concise counter example and deleted the redundant counter README. Less is more, even for Go!
There was a problem hiding this comment.
Pull Request Overview
This PR introduces a new thread-safe counter package (helpers/counter) designed for test coordination and asynchronous operations, while also improving code formatting across the repository.
- Adds a complete
helpers/counterpackage with atomic operations and wait helpers for test synchronization - Integrates the new package into build, release, and CI workflows
- Enhances code formatting by adding
golinessupport for improved line wrapping
Reviewed Changes
Copilot reviewed 14 out of 15 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| helpers/counter/counter.go | Core implementation of thread-safe counter with atomic operations and wait helpers |
| helpers/counter/counter_test.go | Comprehensive test suite covering all counter functionality and timeout scenarios |
| helpers/counter/counter_example_test.go | Example tests demonstrating counter usage patterns |
| helpers/counter/go.mod | Go module definition for the counter package |
| helpers/counter/Makefile | Build, test, and format targets for the counter package |
| README.md | Documentation updates showcasing the new counter package with usage examples |
| testlazy.go | Minor formatting fix changing header style |
| Makefile | Integration of counter package into root build system and golines formatting |
| .release-please-config.json | Release configuration for the new counter package |
| .release-please-manifest.json | Version manifest updates for counter package |
| .github/workflows/tests.yml | CI updates for Go 1.24 compatibility and coverage reporting |
| .github/dependabot.yml | Dependency management configuration for counter package |
| things/testurl/url_test.go | Code formatting improvements using golines |
| things/testurl/Makefile | Added golines formatting support |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
This pull request introduces a new test-focused, thread-safe counter package (
helpers/counter) to the repository, along with supporting configuration, documentation, and build system updates. The counter package is designed to help coordinate asynchronous tests and provides atomic operations and wait helpers. Additional changes ensure that the new module is properly integrated into CI, release, and build workflows.New package addition:
helpers/counterpackage, including implementation (counter.go), tests (counter_test.go), usage examples (counter_example_test.go),Makefile, andgo.mod. The package provides atomic increment/decrement, direct value manipulation, and wait helpers for test coordination. [1] [2] [3] [4] [5]Documentation updates:
README.mdandtestlazy.goto document the new counter package, including usage examples and a description in the package table. [1] [2] [3]Release and build system integration:
.release-please-config.json,.release-please-manifest.json) to includehelpers/counterfor versioning and changelog generation, and added the module to the build/test/lint targets in the rootMakefile. [1] [2] [3]Continuous integration and dependency management:
helpers/counterto Dependabot configuration for automated dependency updates and to GitHub Actions workflow for Go 1.24 compatibility and coverage reporting. [1] [2]Formatting improvements:
Makefiles to usegolinesfor line wrapping if available, improving code readability. [1] [2]