From 40cb6156bdc9a351d9ec8a4283a17c4eb9cbcbe0 Mon Sep 17 00:00:00 2001 From: Andrew Obuchowicz Date: Fri, 4 Oct 2024 13:56:58 -0400 Subject: [PATCH] Chore: improve function names for clarity in che_routing.go Signed-off-by: Andrew Obuchowicz --- controllers/devworkspace/solver/che_routing.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/controllers/devworkspace/solver/che_routing.go b/controllers/devworkspace/solver/che_routing.go index 3a0b9bbac..2c62aa015 100644 --- a/controllers/devworkspace/solver/che_routing.go +++ b/controllers/devworkspace/solver/che_routing.go @@ -565,7 +565,7 @@ func getCommonService(objs *solvers.RoutingObjects, dwId string) *corev1.Service return nil } -func getServiceForEndpoint(objs *solvers.RoutingObjects, endpoint dwo.Endpoint) *corev1.Service { +func getEndpointService(objs *solvers.RoutingObjects, endpoint dwo.Endpoint) *corev1.Service { endpointServiceName := common.EndpointName(endpoint.Name) for _, svc := range objs.Services { if svc.Name == endpointServiceName { @@ -580,9 +580,9 @@ func getServiceForEndpoint(objs *solvers.RoutingObjects, endpoint dwo.Endpoint) // // Endpoints with the "discoverable" attribute set have their own service that should be used. // Endpoints that do not set the "discoverable" attribute should use the common service associated with the workspace. -func getEndpointService(objs *solvers.RoutingObjects, endpoint dwo.Endpoint, commonService *corev1.Service) (*corev1.Service, error) { +func determineEndpointService(objs *solvers.RoutingObjects, endpoint dwo.Endpoint, commonService *corev1.Service) (*corev1.Service, error) { if endpoint.Attributes.GetBoolean(string(dwo.DiscoverableAttribute), nil) { - endpointService := getServiceForEndpoint(objs, endpoint) + endpointService := getEndpointService(objs, endpoint) if endpointService == nil { return nil, fmt.Errorf("could not find endpoint-specfic service for endpoint '%s'", endpoint.Name) }