Fix: Fail fast on unsupported volume versions (#8047)

* Fix: Fail fast when initializing volume with Version 0

* Fix: Fail fast when loading unsupported volume version (e.g. 0 or 4)

* Refactor: Use IsSupportedVersion helper function for version validation
This commit is contained in:
Chris Lu
2026-01-16 19:19:18 -08:00
committed by GitHub
parent 0a46577700
commit a473278bfa
3 changed files with 10 additions and 0 deletions

View File

@@ -11,3 +11,7 @@ const (
func GetCurrentVersion() Version {
return Version3
}
func IsSupportedVersion(v Version) bool {
return v >= Version1 && v <= Version3
}