Improve configuration merge

This commit is contained in:
世界 2023-12-10 22:57:28 +08:00
parent fe053e26b5
commit 36b0f2e91a
No known key found for this signature in database
GPG key ID: CD109927C34A63C4
3 changed files with 16 additions and 18 deletions

View file

@ -20,8 +20,7 @@ import (
)
func parseConfig(configContent string) (option.Options, error) {
var options option.Options
err := options.UnmarshalJSON([]byte(configContent))
options, err := json.UnmarshalExtended[option.Options]([]byte(configContent))
if err != nil {
return option.Options{}, E.Cause(err, "decode config")
}