feat: add embedded examples for configuration files#626
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #626 +/- ##
=======================================
Coverage 80.97% 80.97%
=======================================
Files 162 162
Lines 12084 12084
=======================================
Hits 9785 9785
Misses 1804 1804
Partials 495 495
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Pull request overview
This PR makes the repository’s configuration examples available via embed.FS and updates JSON schema validation tests to consume those embedded examples (rather than relying on walking the repo’s filesystem).
Changes:
- Added
examplespackage exposing an embedded filesystem containing example configuration files. - Updated JSON schema validation tests to walk/read example configs from
examples.Filesviaio/fs. - Refactored JSON rewrite helper to convert configs to JSON from in-memory content (
viper.ReadConfig) instead of reading from disk.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| examples/examples.go | Introduces an embedded FS (Files) containing example config files (*.conf/*.toml/*.yaml/*.json/*.hcl). |
| config/jsonschema/schema_test.go | Switches schema validation tests to use embedded example configs and embeds local invalid configs for the “invalid” subtests. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.