justtrackio / gosoline

Gosoline is our framework which fuels all of our Golang applications
MIT License
96 stars 50 forks source link

config: Track setting usage #1132

Open bt-justtrack opened 4 months ago

bt-justtrack commented 4 months ago

We want to add a property to a setting whether it was used at some point in time or not. That would enable easy cleanup of unused config settings.

bt-justtrack commented 3 months ago

Plan: Once we have #1133 we can have Providers optionally also implement another interface allowing them to track usage for settings keys. Here you can ask them to return the list of used and unused settings keys. For eg the env var provider this usage tracking could be tracking all actually requested env vars and returning as unused the set of all env var keys - the set of requested keys.