Skip to content

Commit

Permalink
Remove duplicate
Browse files Browse the repository at this point in the history
  • Loading branch information
khanhtc1202 committed Jul 21, 2022
1 parent 2073427 commit f413a7e
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions pkg/config/piped.go
Expand Up @@ -215,13 +215,8 @@ func (s *PipedSpec) EnableDefaultKubernetesPlatformProvider() {

// HasPlatformProvider checks whether the given provider is configured or not.
func (s *PipedSpec) HasPlatformProvider(name string, t model.ApplicationKind) bool {
requiredProviderType := t.CompatiblePlatformProviderType()
for _, cp := range s.PlatformProviders {
if cp.Name == name && cp.Type == requiredProviderType {
return true
}
}
return false
_, contains := s.FindPlatformProvider(name, t)
return contains
}

// FindPlatformProvider finds and returns a Platform Provider by name and type.
Expand Down

0 comments on commit f413a7e

Please sign in to comment.