cmd: add verify command to verify if config file syntax is valid (#2389)

This commit is contained in:
fatedier
2021-05-12 12:15:22 +08:00
committed by GitHub
parent 630dad50ed
commit 9cebfccb39
4 changed files with 111 additions and 4 deletions

View File

@@ -274,7 +274,7 @@ func NewProxyConfFromIni(prefix, name string, section *ini.Section) (ProxyConf,
conf := DefaultProxyConf(proxyType)
if conf == nil {
return nil, fmt.Errorf("proxy [%s] type [%s] error", name, proxyType)
return nil, fmt.Errorf("proxy %s has invalid type [%s]", name, proxyType)
}
if err := conf.UnmarshalFromIni(prefix, name, section); err != nil {