new room gui

This commit is contained in:
Aynakeya
2022-11-28 18:39:12 -08:00
parent eac8b7b775
commit 0498d2dbf3
38 changed files with 1368 additions and 324 deletions

23
config/jsonconfig.go Normal file
View File

@@ -0,0 +1,23 @@
package config
import (
"encoding/json"
"os"
)
func LoadJson(path string, dst any) error {
data, err := os.ReadFile(path)
if err != nil {
return err
}
return json.Unmarshal(data, dst)
}
func SaveJson(path string, dst any) error {
data, err := json.MarshalIndent(dst, "", " ")
if err != nil {
return err
}
return os.WriteFile(path, data, 0666)
}