feat(06-01): implement config package with TOML load, merge, validate

- Load() discovers, parses, validates, and merges TOML config over defaults
- SoundOverride struct with *float64/*string pointer fields for partial-merge (CFG-04)
- parseFile uses BurntSushi/toml DecodeFile + Undecoded() for unknown-key errors (CFG-05)
- discoverPath probes ./netsynth.toml then ~/.config/netsynth/config.toml (CFG-02)
- merge applies non-nil overrides per class; warns on unknown class names (D-09)
- parseWaveform maps sine/square/sawtooth/triangle strings to WaveformType
- Harmonics regenerated via WaveformPresetHarmonics when waveform/frequency changes
- All 9 tests pass; go vet clean
This commit is contained in:
2026-03-26 20:57:00 +01:00
parent b9ec05aebc
commit 1f877e7574
3 changed files with 181 additions and 4 deletions
+1
View File
@@ -9,6 +9,7 @@ require (
)
require (
github.com/BurntSushi/toml v1.6.0 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/sirupsen/logrus v1.9.3 // indirect
github.com/sjzar/go-lame v0.0.9 // indirect