fix: apiversion.UseLatest 阈值判断改为 >= 避免误判新版本为老版本
All checks were successful
Build docker and publish / build (20.15.1) (push) Successful in 8m26s
All checks were successful
Build docker and publish / build (20.15.1) (push) Successful in 8m26s
原 compare > 0 要求严格大于阈值,导致 header=1.0.0 被判为老版本, 去掉最后一个套餐后列表为空。改为 >= 0,有 header 且版本 >= 阈值均视为新版本。 Co-Authored-By: claude-flow <ruv@ruv.net>
This commit is contained in:
parent
1a08949c80
commit
eb414749c3
@ -54,7 +54,7 @@ func UseLatest(header string, threshold string) bool {
|
||||
thresholdVersion, _ = Parse(DefaultThreshold)
|
||||
}
|
||||
|
||||
return compare(currentVersion, thresholdVersion) > 0
|
||||
return compare(currentVersion, thresholdVersion) >= 0
|
||||
}
|
||||
|
||||
func compare(left Version, right Version) int {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user