- 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
22 lines
596 B
Go
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
|
|
}
|