UPDATE: update to go 1.25

This commit is contained in:
2025-08-24 17:22:30 +07:00
parent b2adcd7981
commit 99b9df1ce5
11 changed files with 1232 additions and 1730 deletions

View File

@@ -116,7 +116,7 @@ func (h *HdiffzService) CutData(gamePath string) (bool, string) {
return err
}
destPath := filepath.Join(gamePath, relPath)
application.Get().EmitEvent("hdiffz:message", map[string]string{"message": destPath})
application.Get().Event.Emit("hdiffz:message", map[string]string{"message": destPath})
if info.IsDir() {
return os.MkdirAll(destPath, os.ModePerm)
}
@@ -189,7 +189,7 @@ func (h *HdiffzService) PatchData(gamePath string) (bool, string) {
}
for i, entry := range jsonData.DiffMap {
application.Get().EmitEvent(
application.Get().Event.Emit(
"hdiffz:progress", map[string]int{
"progress": i,
"maxProgress": len(jsonData.DiffMap),
@@ -262,7 +262,7 @@ func (h *HdiffzService) DeleteFiles(gamePath string) (bool, string) {
for i, file := range deleteFiles {
os.Remove(filepath.Join(gamePath, file))
application.Get().EmitEvent("hdiffz:progress", map[string]int{"progress": i, "maxProgress": len(deleteFiles)})
application.Get().Event.Emit("hdiffz:progress", map[string]int{"progress": i, "maxProgress": len(deleteFiles)})
}
_ = os.Remove(filepath.Join(gamePath, "deletefiles.txt"))
return true, ""