Skip to content

Commit

Permalink
Remove redundant check if service collection's length is greater than…
Browse files Browse the repository at this point in the history
… 0 or not

Signed-off-by: Burak Sekili <buraksekili@gmail.com>
  • Loading branch information
buraksekili committed Oct 18, 2023
1 parent 3c7d27d commit 0f4aa9d
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions data/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,9 +180,7 @@ func discoverDashboardSvc() error {
fmt.Printf("[WARNING] Found multiple open ports in svc/%v/%v\n", service.Name, service.Namespace)
}

if len(service.Spec.Ports) > 0 {
AppConfig.DashboardPort = service.Spec.Ports[0].Port
}
AppConfig.DashboardPort = service.Spec.Ports[0].Port
AppConfig.DashboardSvc = service.Name

return nil
Expand Down

0 comments on commit 0f4aa9d

Please sign in to comment.