diff --git a/domain/structures.go b/domain/structures.go index 9fa0aa8..61aa4fa 100644 --- a/domain/structures.go +++ b/domain/structures.go @@ -1,10 +1,16 @@ package domain +import "strconv" + type JavaVersion struct { VersionNums `json:"version"` Specifics []JavaVersionSpecifics `json:"specifics"` } +func (jVer *JavaVersion) GetVersionString() string { + return strconv.Itoa(jVer.Major) + "." + strconv.Itoa(jVer.Minor) + "." + strconv.Itoa(jVer.Patch) +} + type JavaVersionSpecifics struct { Os string `json:"os"` Arch string `json:"arch"`