small refactoring

This commit is contained in:
yusing
2024-03-11 10:50:06 +00:00
parent d3684b62b7
commit 0a34a23ea2
7 changed files with 70 additions and 66 deletions

View File

@@ -11,7 +11,7 @@ type ProxyConfig struct {
Path string // http proxy only
PathMode string `yaml:"path_mode"` // http proxy only
provider *Provider
provider *Provider
}
func NewProxyConfig(provider *Provider) ProxyConfig {
@@ -21,7 +21,7 @@ func NewProxyConfig(provider *Provider) ProxyConfig {
}
// used by `GetFileProxyConfigs`
func (cfg *ProxyConfig) SetDefault() error {
func (cfg *ProxyConfig) SetDefaults() error {
if cfg.Alias == "" {
return fmt.Errorf("alias is required")
}