mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2025-01-06 01:23:38 +08:00
Chore: fix typo (#490)
This commit is contained in:
parent
14fb789002
commit
82c387e92b
@ -41,7 +41,7 @@ func ParseProxyProvider(name string, mapping map[string]interface{}) (ProxyProvi
|
|||||||
}
|
}
|
||||||
hc := NewHealthCheck([]C.Proxy{}, schema.HealthCheck.URL, hcInterval)
|
hc := NewHealthCheck([]C.Proxy{}, schema.HealthCheck.URL, hcInterval)
|
||||||
|
|
||||||
path := C.Path.Reslove(schema.Path)
|
path := C.Path.Resolve(schema.Path)
|
||||||
|
|
||||||
var vehicle Vehicle
|
var vehicle Vehicle
|
||||||
switch schema.Type {
|
switch schema.Type {
|
||||||
|
@ -207,7 +207,7 @@ func parseGeneral(cfg *RawConfig) (*General, error) {
|
|||||||
logLevel := cfg.LogLevel
|
logLevel := cfg.LogLevel
|
||||||
|
|
||||||
if externalUI != "" {
|
if externalUI != "" {
|
||||||
externalUI = C.Path.Reslove(externalUI)
|
externalUI = C.Path.Resolve(externalUI)
|
||||||
|
|
||||||
if _, err := os.Stat(externalUI); os.IsNotExist(err) {
|
if _, err := os.Stat(externalUI); os.IsNotExist(err) {
|
||||||
return nil, fmt.Errorf("external-ui: %s not exist", externalUI)
|
return nil, fmt.Errorf("external-ui: %s not exist", externalUI)
|
||||||
|
@ -44,8 +44,8 @@ func (p *path) Config() string {
|
|||||||
return p.configFile
|
return p.configFile
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reslove return a absolute path or a relative path with homedir
|
// Resolve return a absolute path or a relative path with homedir
|
||||||
func (p *path) Reslove(path string) string {
|
func (p *path) Resolve(path string) string {
|
||||||
if !filepath.IsAbs(path) {
|
if !filepath.IsAbs(path) {
|
||||||
return filepath.Join(p.HomeDir(), path)
|
return filepath.Join(p.HomeDir(), path)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user