feat: add configuration management with YAML parsing and validation

Add internal/config package with Config struct (Server, Navidrome,
MusicBrainz, Telegram, Scanner sections), LoadConfig function for
YAML parsing, config validation (required fields, port range,
threshold range), and defaults. Include config.yaml.example matching
spec. Update main.go to use real config package instead of
placeholders. Add comprehensive tests covering valid configs,
defaults, missing files, malformed YAML, and validation boundaries.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-20 08:47:04 +03:00
parent eb266ed5ec
commit 6ff4ec3045
8 changed files with 564 additions and 72 deletions

2
go.mod
View File

@@ -1,3 +1,5 @@
module naviwatcher
go 1.25.1
require gopkg.in/yaml.v3 v3.0.1 // indirect