mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-04-30 09:18:34 +00:00
Adjust JSON & TOML & YAML
This commit is contained in:
parent
3d7e86efba
commit
ffd8fd1d8a
9 changed files with 32 additions and 75 deletions
|
@ -22,9 +22,13 @@ func init() {
|
|||
for i, arg := range v {
|
||||
newError("Reading config: ", arg).AtInfo().WriteToLog()
|
||||
r, err := confloader.LoadConfig(arg)
|
||||
common.Must(err)
|
||||
if err != nil {
|
||||
return nil, newError("failed to read config: ", arg).Base(err)
|
||||
}
|
||||
c, err := serial.DecodeYAMLConfig(r)
|
||||
common.Must(err)
|
||||
if err != nil {
|
||||
return nil, newError("failed to decode config: ", arg).Base(err)
|
||||
}
|
||||
if i == 0 {
|
||||
// This ensure even if the muti-json parser do not support a setting,
|
||||
// It is still respected automatically for the first configure file
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue