feat: migrate from env vars to config.toml
- Add internal/config package with TOML parsing (BurntSushi/toml) - Create config.example.toml documenting all settings - Update main.go to load config via -config flag (default: config.toml) - Environment variables remain as fallback overrides for backward compat - Config file values are used as defaults; env vars override when set - Add comprehensive tests for file loading, defaults, and env overrides - Add config.toml to .gitignore (secrets stay local)
This commit is contained in:
parent
dc44837219
commit
8649864971
6 changed files with 329 additions and 16 deletions
1
go.mod
1
go.mod
|
|
@ -3,6 +3,7 @@ module github.com/ashie/gosearch
|
|||
go 1.25.0
|
||||
|
||||
require (
|
||||
github.com/BurntSushi/toml v1.5.0
|
||||
github.com/PuerkitoBio/goquery v1.12.0 // indirect
|
||||
github.com/andybalholm/cascadia v1.3.3 // indirect
|
||||
golang.org/x/net v0.52.0 // indirect
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue