Fix: should not unmarshal to pointer (#1615)

This commit is contained in:
Kr328 2021-09-13 23:43:28 +08:00 committed by GitHub
parent 0c79d1207e
commit d49b38b00f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -22,7 +22,7 @@ import (
R "github.com/Dreamacro/clash/rule"
T "github.com/Dreamacro/clash/tunnel"
yaml "gopkg.in/yaml.v2"
"gopkg.in/yaml.v2"
)
// General config
@ -188,7 +188,7 @@ func UnmarshalRawConfig(buf []byte) (*RawConfig, error) {
},
}
if err := yaml.Unmarshal(buf, &rawCfg); err != nil {
if err := yaml.Unmarshal(buf, rawCfg); err != nil {
return nil, err
}