Skip to content

Commit

Permalink
detect providers connectors via aliases (#1970)
Browse files Browse the repository at this point in the history
Signed-off-by: Ivan Milchev <[email protected]>
  • Loading branch information
imilchev authored Sep 28, 2023
1 parent 4555104 commit 6ebd399
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions providers/providers.go
Original file line number Diff line number Diff line change
Expand Up @@ -575,6 +575,9 @@ func (p Providers) ForConnection(name string, typ string) *Provider {
if provider.Connectors[i].Name == name {
return provider
}
if slices.Contains(provider.Connectors[i].Aliases, name) {
return provider
}
}
}
}
Expand All @@ -584,6 +587,11 @@ func (p Providers) ForConnection(name string, typ string) *Provider {
if slices.Contains(provider.ConnectionTypes, typ) {
return provider
}
for i := range provider.Connectors {
if slices.Contains(provider.Connectors[i].Aliases, typ) {
return provider
}
}
}
}

Expand Down

0 comments on commit 6ebd399

Please sign in to comment.