fix: remove duplicate imports in component/notify test file causing build failure#356
Merged
Conversation
Contributor
|
感谢您提出Pull Request,我会尽快Review。我会在1-2日内进行查看或者回复,如果遇到节假日可能会处理较慢,敬请谅解。 |
Co-authored-by: zouyx <3828072+zouyx@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Create release branch for version 5.0.0
release: bump module to v5.0.0
Mar 14, 2026
zouyx
approved these changes
Mar 14, 2026
Contributor
|
这个 PR 发生了冲突. @Copilot 是否能帮忙修复呢? 🙏 |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR promotes the repository to a new major Go module version (v5) by updating the module path and rewriting internal import paths accordingly, along with updating documentation and adding a changelog for the v5.0.0 release.
Changes:
- Update
go.modmodule path togithub.com/apolloconfig/agollo/v5 - Rewrite internal Go imports from
/v4to/v5across the codebase - Update README installation/usage snippets and add a
CHANGELOG.mdfor v5.0.0
Reviewed changes
Copilot reviewed 59 out of 59 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| go.mod | Bumps module path to /v5 (major version module convention). |
| client.go | Updates internal imports to /v5. |
| client_test.go | Updates internal imports to /v5 (note: redundant duplicate blank import flagged). |
| start.go | Updates internal imports to /v5. |
| start_test.go | Updates internal imports to /v5. |
| mock_server_test.go | Updates internal imports to /v5. |
| agcache/memory/memory.go | Updates internal imports to /v5. |
| agcache/memory/memory_test.go | Updates internal imports to /v5. |
| cluster/load_balance.go | Updates internal imports to /v5. |
| cluster/roundrobin/round_robin.go | Updates internal imports to /v5. |
| cluster/roundrobin/round_robin_test.go | Updates internal imports to /v5. |
| component/common.go | Updates internal imports to /v5. |
| component/common_test.go | Updates internal imports to /v5. |
| component/notify/componet_notify.go | Updates internal imports to /v5. |
| component/notify/change_event_test.go | Updates internal imports to /v5 (note: redundant blank imports flagged). |
| component/remote/abs.go | Updates internal imports to /v5. |
| component/remote/async.go | Updates internal imports to /v5. |
| component/remote/async_test.go | Updates internal imports to /v5. |
| component/remote/remote.go | Updates internal imports to /v5. |
| component/remote/sync.go | Updates internal imports to /v5. |
| component/remote/sync_test.go | Updates internal imports to /v5. |
| component/serverlist/sync.go | Updates internal imports to /v5. |
| component/serverlist/sync_test.go | Updates internal imports to /v5. |
| env/app_config.go | Updates internal imports to /v5. |
| env/app_config_test.go | Updates internal imports to /v5. |
| env/config/apollo_config.go | Updates internal imports to /v5. |
| env/config/apollo_config_test.go | Updates internal imports to /v5. |
| env/config/config.go | Updates internal imports to /v5. |
| env/config/config_test.go | Updates internal imports to /v5. |
| env/config/json/json_config.go | Updates internal imports to /v5. |
| env/config/json/json_config_test.go | Updates internal imports to /v5. |
| env/file/file_handler.go | Updates internal imports to /v5. |
| env/file/json/json.go | Updates internal imports to /v5. |
| env/file/json/json_test.go | Updates internal imports to /v5. |
| env/file/json/raw.go | Updates internal imports to /v5. |
| env/file/json/raw_test.go | Updates internal imports to /v5. |
| env/server/server.go | Updates internal imports to /v5. |
| env/server/server_test.go | Updates internal imports to /v5. |
| extension/cache.go | Updates internal imports to /v5. |
| extension/cache_test.go | Updates internal imports to /v5. |
| extension/file.go | Updates internal imports to /v5. |
| extension/file_test.go | Updates internal imports to /v5. |
| extension/format_parser.go | Updates internal imports to /v5. |
| extension/format_parser_test.go | Updates internal imports to /v5. |
| extension/load_balance.go | Updates internal imports to /v5. |
| extension/load_balance_test.go | Updates internal imports to /v5. |
| extension/sign.go | Updates internal imports to /v5. |
| protocol/http/request.go | Updates internal imports to /v5. |
| protocol/http/request_test.go | Updates internal imports to /v5. |
| storage/event_dispatch.go | Updates internal imports to /v5. |
| storage/repository.go | Updates internal imports to /v5. |
| storage/repository_test.go | Updates internal imports to /v5 (note: redundant blank import flagged). |
| utils/parse/yaml/parser.go | Updates internal imports to /v5. |
| utils/parse/yaml/parser_test.go | Updates internal imports to /v5. |
| utils/parse/yml/parser.go | Updates internal imports to /v5. |
| utils/parse/yml/parser_test.go | Updates internal imports to /v5. |
| README.md | Updates install/import examples to /v5. |
| README_CN.md | Updates install/import examples to /v5. |
| CHANGELOG.md | Adds v5.0.0 changelog entry and migration guidance. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
Comment on lines
+24
to
+28
| "github.com/apolloconfig/agollo/v5/agcache/memory" | ||
| _ "github.com/apolloconfig/agollo/v5/agcache/memory" | ||
| "github.com/apolloconfig/agollo/v5/env" | ||
| "github.com/apolloconfig/agollo/v5/env/config" | ||
| _ "github.com/apolloconfig/agollo/v5/env/file/json" |
Comment on lines
+1
to
3
| module github.com/apolloconfig/agollo/v5 | ||
|
|
||
| go 1.20 |
Co-authored-by: zouyx <3828072+zouyx@users.noreply.github.com>
Copilot
AI
changed the title
release: bump module to v5.0.0
fix: remove duplicate imports in component/notify test file causing build failure
Mar 14, 2026
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
zouyx
approved these changes
Mar 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
component/notify/componet_notify_test.gohad two duplicate imports left over from the v4→v5 module path migration, causing the package to fail to compile:. "github.com/tevid/gohamcrest"imported twice → all exported symbols (Assert,Equal,BaseMatcher, etc.) redeclared in blockgithub.com/apolloconfig/agollo/v5/cluster/roundrobinimported twice (once named, once as_)Changes
component/notify/componet_notify_test.go: deduplicate the import block — remove the second. "github.com/tevid/gohamcrest"and the redundant blank_ roundrobinimportOriginal prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.