Browse Source

release v1.1

master
Merith-TK 10 months ago
parent
commit
0c07336eb7
2 changed files with 4 additions and 4 deletions
  1. +1
    -1
      file.go
  2. +3
    -3
      main.go

+ 1
- 1
file.go View File

@ -27,7 +27,7 @@ type release struct {
}
func filecheck(filename string) {
err := getjson("https://cdn.merith.tk/_Releases/Other/minecraft.json", &rel)
err := getjson("https://git.merith.tk/merith-tk/Test-repo/raw/branch/master/minecraft.json", &rel)
if err != nil {
fmt.Println("Failed to PARSE json\n", err)
fmt.Println(rel)

+ 3
- 3
main.go View File

@ -41,21 +41,21 @@ func main() {
}
func createConfig() {
func createConfig() (string, bool) {
dlgs.Warning("[MineCraftPortable]", "This application takes a bit to work on the first run, please be patient")
file, _ := os.Create(configfile)
defer file.Close()
_, _ = io.WriteString(file, `{"launcher":"minecraft.exe","java":false}`)
file.Sync()
main()
return readjson()
}
func readjson() (string, bool) {
str, err := ioutil.ReadFile(configfile)
if err != nil {
fmt.Println("Creating Config")
createConfig()
return createConfig()
}
err = json.Unmarshal([]byte(str), &conf)

Loading…
Cancel
Save