chore!: 升级 Go 至 1.26 并适配 go vet#1054
Merged
Merged
Conversation
Assisted-by: Codex:gpt-5.5
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.
背景
我之前在 #1053 里讨论了一个后续可能探索的方向。前期调研时发现,如果继续推进这个方向,可能会涉及较新的第三方依赖,而这些依赖对 Go 工具链版本有更高要求。
为了避免后续功能 PR 同时混入依赖引入、Go 版本升级和大量
go vet机械修改,这个 PR 先单独完成 Go 版本升级和现有代码的 vet 适配。即使后续不继续推进 #1053 中讨论的方向,提前升级 Go 版本也有独立价值:项目可以使用更新的 Go 工具链,并提前消化高版本
go vet的检查规则,降低后续维护和依赖升级成本。改动内容
go.mod的 Go 版本升级到1.26。golang:1.26-alpine。log.Panicf(err.Error())这类非 const format string 调用改为log.Panicf("%v", err),适配新版go vet规则。BREAKING CHANGE
构建 RedisShake 需要使用 Go 1.26 或更高版本。运行时配置和业务行为不应发生变化。