mirror of
https://github.com/vsariola/sointu.git
synced 2025-07-22 15:04:36 -04:00
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:
parent
27bf8220c0
commit
ddbaf6a4bb
@ -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))
|
||||
}
|
||||
|
Reference in New Issue
Block a user