Compare commits

..

No commits in common. "7e2a75d11dcb68a5daaecc4f24dd3a222f282001" and "145c56e9f6540b8673181f264c703fb03d184a37" have entirely different histories.

2 changed files with 3 additions and 8 deletions

View File

@ -7,10 +7,6 @@ type JavaVersion struct {
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"`

View File

@ -7,10 +7,10 @@ import (
"os" "os"
) )
func WriteStructAsJSON(data interface{}, JsonPath string) error { func WriteStructAsJSON(data interface{}, versionJsonPath string) error {
file, _ := json.MarshalIndent(data, "", " ") file, _ := json.MarshalIndent(data, "", " ")
directory, err := GetParentDir(JsonPath) directory, err := GetParentDir(versionJsonPath)
if err != nil { if err != nil {
return err return err
} }
@ -18,7 +18,7 @@ func WriteStructAsJSON(data interface{}, JsonPath string) error {
if err != nil { if err != nil {
return err return err
} }
err = ioutil.WriteFile(JsonPath, file, 0644) err = ioutil.WriteFile(versionJsonPath, file, 0644)
if err != nil { if err != nil {
return err return err
} }
@ -31,7 +31,6 @@ func ReadJsonFromDisk(target interface{}, filePath string) error {
// if we os.Open returns an error then handle it // if we os.Open returns an error then handle it
if err != nil { if err != nil {
fmt.Println(err) fmt.Println(err)
return err
} }
// fmt.Println("Successfully Opened users.json") // fmt.Println("Successfully Opened users.json")