add func to generate java version string

This commit is contained in:
cyber-dream 2023-02-15 01:15:42 +03:00
parent f44e6b104b
commit 4bc1db5397

View File

@ -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"`