Files
archie/internal/infrastructure/configuration/helpers_test.go
T
sam 308666b410 chore: remove legacy terminology and dead code
- Reword docs and comments to drop vague "legacy" qualifiers where they no longer describe deprecation status
- Remove unused code: RecentEvents, MessageEvent.ToLegacy, index setState, stderr redaction tool, telegramOnlyCommands
- Delete or comment out tests covering removed or superseded behavior
2026-08-06 22:55:26 +10:00

22 lines
596 B
Go

package configuration
import "github.com/samcharles93/archie-core/internal/config"
// These helpers unwrap Document for tests that only assert on the resulting
// settings. Tests covering provenance use the Loader methods directly.
func loadFile(path string) (config.Config, error) {
return unwrap(New(nil).File(path))
}
func loadOverlay(basePath, overlayPath string) (config.Config, error) {
return unwrap(New(nil).Overlay(basePath, overlayPath))
}
func unwrap(doc *Document, err error) (config.Config, error) {
if err != nil {
return config.Config{}, err
}
return doc.Config, nil
}