diff options
| author | historia <[not public]> | 2026-06-14 22:42:27 -0400 |
|---|---|---|
| committer | historia <[not public]> | 2026-06-14 22:42:27 -0400 |
| commit | eb37418b933d7bd996658209e867ea3f3e3806ec (patch) | |
| tree | 9988922fe95300a83177b76bcdfb9420c240c655 /internal/config | |
| parent | a6f0ad79e2e3a5b7c11eef1ffc3233f3a2766f77 (diff) | |
| download | thehouseoficarus-eb37418b933d7bd996658209e867ea3f3e3806ec.tar.gz | |
feat: default config file generated if doesn't exist
Diffstat (limited to 'internal/config')
| -rw-r--r-- | internal/config/config.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/internal/config/config.go b/internal/config/config.go index d397fae..a86689e 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -67,3 +67,12 @@ func Load(path string) (*Config, error) { } return cfg, nil } + +func SaveDefault(path string) error { + cfg := Default() + data, err := yaml.Marshal(cfg) + if err != nil { + return err + } + return os.WriteFile(path, data, 0644) +} |
