refactor(tracker): use UnmarshalStrict when decoding embedded yamls

Since we have 100% control over what data gets embedded, there is no
reason to embed anything that doesn't pass the strict yaml parsing
and it's better we throw a panic right away so it's easy to catch
this during development.
This commit is contained in:
5684185+vsariola@users.noreply.github.com
2025-05-23 21:44:23 +03:00
parent 27bf8220c0
commit ddbaf6a4bb
3 changed files with 4 additions and 4 deletions

View File

@ -29,7 +29,7 @@ var defaultPreferencesYaml []byte
func loadDefaultPreferences() Preferences {
var preferences Preferences
err := yaml.Unmarshal(defaultPreferencesYaml, &preferences)
err := yaml.UnmarshalStrict(defaultPreferencesYaml, &preferences)
if err != nil {
panic(fmt.Errorf("failed to unmarshal preferences: %w", err))
}