fixed startup crash for file provider

This commit is contained in:
yusing
2024-09-21 17:22:17 +08:00
parent a29bf880bc
commit 26e2154c64
6 changed files with 29 additions and 18 deletions

View File

@@ -30,6 +30,10 @@ type (
var NewProxyEntries = F.NewMapOf[string, *ProxyEntry]
func (e *ProxyEntry) SetDefaults() {
if e.ProxyProperties == nil {
e.ProxyProperties = &D.ProxyProperties{}
}
if e.Scheme == "" {
switch {
case strings.ContainsRune(e.Port, ':'):