diff --git a/adapters/provider/parser.go b/adapters/provider/parser.go index 7428ad14..e662b679 100644 --- a/adapters/provider/parser.go +++ b/adapters/provider/parser.go @@ -41,7 +41,7 @@ func ParseProxyProvider(name string, mapping map[string]interface{}) (ProxyProvi } hc := NewHealthCheck([]C.Proxy{}, schema.HealthCheck.URL, hcInterval) - path := C.Path.Reslove(schema.Path) + path := C.Path.Resolve(schema.Path) var vehicle Vehicle switch schema.Type { diff --git a/config/config.go b/config/config.go index 24cd330b..be6ae542 100644 --- a/config/config.go +++ b/config/config.go @@ -207,7 +207,7 @@ func parseGeneral(cfg *RawConfig) (*General, error) { logLevel := cfg.LogLevel if externalUI != "" { - externalUI = C.Path.Reslove(externalUI) + externalUI = C.Path.Resolve(externalUI) if _, err := os.Stat(externalUI); os.IsNotExist(err) { return nil, fmt.Errorf("external-ui: %s not exist", externalUI) diff --git a/constant/path.go b/constant/path.go index 9af355b2..6f4af046 100644 --- a/constant/path.go +++ b/constant/path.go @@ -44,8 +44,8 @@ func (p *path) Config() string { return p.configFile } -// Reslove return a absolute path or a relative path with homedir -func (p *path) Reslove(path string) string { +// Resolve return a absolute path or a relative path with homedir +func (p *path) Resolve(path string) string { if !filepath.IsAbs(path) { return filepath.Join(p.HomeDir(), path) }