chore: Cleaned up code.

This commit is contained in:
2026-06-15 09:26:48 -04:00
parent b47ca8f14d
commit e510f72799
19 changed files with 276 additions and 176 deletions

View File

@@ -24,8 +24,10 @@ Config :: struct {
}
default_config_path :: proc(home: string) -> string {
// FIXME: catch error
path, _ := filepath.join([]string{home, ".envr", "config.json"})
path, err := filepath.join([]string{home, ".envr", "config.json"})
if err != nil {
panic("Ran out of memory when building config path")
}
return path
}
@@ -37,6 +39,7 @@ load_config :: proc(config_path: string) -> (Config, bool) {
}
cfg: Config
// TODO: use json 5
err := json.unmarshal(data, &cfg)
if err != nil {
fmt.printf("Error parsing config: %v\n", err)