refactor: show placeholder for certificate directory field too

Drop the hardcoded dummy fallback for Certificates.DirPath in loadConfig
so the field shows its placeholder instead of a pre-filled value, matching
the DB URL and central server URL fields. An existing config.toml still
seeds it on re-run.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
jb
2026-06-19 12:31:53 -03:00
co-authored by Claude Opus 4.8
parent d4ed79115c
commit 920fa5e904
+4 -5
View File
@@ -91,11 +91,10 @@ func loadConfig() AppConfig {
config.Database.MaxConns = 10 config.Database.MaxConns = 10
config.Database.MinConns = 2 config.Database.MinConns = 2
config.Certificates.DirPath = "/caminho/para/diretorio" // Database.URL, Certificates.DirPath and Application.CentralServerURL are
// intentionally left empty so the fields show their placeholder instead of a
// Database.URL and Application.CentralServerURL are intentionally left empty so the // pre-filled dummy. A real config.toml (re-run) still seeds them through the
// fields show their placeholder instead of a pre-filled dummy. A real config.toml // decode below.
// (re-run) still seeds them through the decode below.
_, err := os.Stat("config.toml") _, err := os.Stat("config.toml")
if err == nil { if err == nil {