fix(CurrentRecipePointer): 🐛 Fix cache recipe

Remove continue last opened version
This commit is contained in:
pakintada@gmail.com 2024-04-11 16:59:37 +07:00
parent 4219c1cb43
commit 2b8745679f
16 changed files with 481 additions and 174 deletions

View file

@ -140,8 +140,23 @@ type CountryNamePerms struct {
func LoadCountrySettingsWithPermissions() []CountryNamePerms {
res := make([]CountryNamePerms, 0)
path, err := os.Getwd()
if err != nil {
log.Println(err)
}
fmt.Println(path)
files, err := os.ReadDir(path)
if err != nil {
log.Fatalln(err)
}
for _, file := range files {
fmt.Println(file.Name(), file.IsDir())
}
// read file country.settings.json
content, err := os.Open("country.settings.json")
content, err := os.Open("./country.settings.json")
if err != nil {
fmt.Println(fmt.Errorf("country.settings.json not found"))
}