mirror of
https://github.com/SagerNet/sing-box.git
synced 2025-04-04 12:27:36 +03:00
Improve configuration merge
This commit is contained in:
parent
fe053e26b5
commit
36b0f2e91a
3 changed files with 16 additions and 18 deletions
|
@ -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")
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue