Reorder config loading so it doesn't merge values inappropriately
This PR changes the order of operations when loading the config.yml
Currently when wings starts up, it starts with an empty Configuration struct that is then filled with the defaults and THEN we overlay the data from the config.yml using yaml.Unmarshal(). This overwrites any values in the struct with any values that exist in the config.yml
The issue is when encountering an array/list/map yaml.Unmarshal() will merge the values from the config.yml with the defaults. Such as shown in https://github.com/pterodactyl/panel/issues/5008
By changing the order so that defaults.Set() is called after the struct has been filled with the data from config.yml, only missing keys will be filled
This would resolve https://github.com/pterodactyl/panel/issues/5008
Submitted as a draft while I wait for a couple of people to test it.
Had a few people try this and report positive results. No reports of unintended consequences and I'm using this myself in prod.
Seeing this implement would really help when trying to add solutions like Grafana Loki as a logging db. I can attest that this broke nothing on my test setup and am looking forward to this being merged