mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2024-11-16 19:56:51 +08:00
Fix: ParseWithBytes should recive buffer and parse buffer
This commit is contained in:
parent
77b38b3285
commit
5314d8bb19
|
@ -65,12 +65,12 @@ func ParseWithPath(path string) (*config.Config, error) {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
return config.Parse(buf)
|
return ParseWithBytes(buf)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Parse config with default config path
|
// ParseWithBytes config with buffer
|
||||||
func ParseWithBytes(buf []byte) (*config.Config, error) {
|
func ParseWithBytes(buf []byte) (*config.Config, error) {
|
||||||
return ParseWithPath(C.Path.Config())
|
return config.Parse(buf)
|
||||||
}
|
}
|
||||||
|
|
||||||
// ApplyConfig dispatch configure to all parts
|
// ApplyConfig dispatch configure to all parts
|
||||||
|
|
Loading…
Reference in New Issue
Block a user