return the string representative of the CurrentVersion value

Signed-off-by: Benjamin Wang <benjamin.ahrtr@gmail.com>
This commit is contained in:
Benjamin Wang 2025-03-21 21:34:40 +00:00
parent 5e272463f7
commit ee2f4e0e9b

View File

@ -23,6 +23,13 @@ const (
LastVersion ClusterVersion = "last-version"
)
func (cv ClusterVersion) String() string {
if cv == CurrentVersion {
return "current-version"
}
return string(cv)
}
type ClusterContext struct {
Version ClusterVersion
}