add func to generate java version string
This commit is contained in:
parent
f44e6b104b
commit
4bc1db5397
@ -1,10 +1,16 @@
|
|||||||
package domain
|
package domain
|
||||||
|
|
||||||
|
import "strconv"
|
||||||
|
|
||||||
type JavaVersion struct {
|
type JavaVersion struct {
|
||||||
VersionNums `json:"version"`
|
VersionNums `json:"version"`
|
||||||
Specifics []JavaVersionSpecifics `json:"specifics"`
|
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 {
|
type JavaVersionSpecifics struct {
|
||||||
Os string `json:"os"`
|
Os string `json:"os"`
|
||||||
Arch string `json:"arch"`
|
Arch string `json:"arch"`
|
||||||
|
Loading…
Reference in New Issue
Block a user