1
0
mirror of https://github.com/lxc/incus.git synced 2026-02-05 09:46:19 +01:00

internal/version: Rename variables to better represent what they are used for

Rename maj to major and min to minor. Also, `min` is a builtin function name and was shadowed by the variable.

Signed-off-by: karo <karolin.kostial@gmail.com>
This commit is contained in:
karo
2025-04-27 15:38:01 +02:00
parent e96697a756
commit 52bf3aa932

View File

@@ -22,12 +22,12 @@ func NewDottedVersion(versionString string) (*DottedVersion, error) {
return nil, formatError
}
maj, err := strconv.Atoi(split[0])
major, err := strconv.Atoi(split[0])
if err != nil {
return nil, formatError
}
min, err := strconv.Atoi(split[1])
minor, err := strconv.Atoi(split[1])
if err != nil {
return nil, formatError
}
@@ -41,8 +41,8 @@ func NewDottedVersion(versionString string) (*DottedVersion, error) {
}
return &DottedVersion{
Major: maj,
Minor: min,
Major: major,
Minor: minor,
Patch: patch,
}, nil
}