Skip to content

Commit 91f1014

Browse files
committed
fixup! fixup! chore: consistent error
Signed-off-by: Oleksii Kurinnyi <[email protected]>
1 parent c7ddd74 commit 91f1014

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

controllers/controller/devworkspacerouting/solvers/errors.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ var _ error = (*ServiceConflictError)(nil)
2828
// ServiceConflictError is returned when a discoverable endpoint has a name that is already in use by
2929
// another DevWorkspace's service.
3030
type ServiceConflictError struct {
31-
EndpointName string
31+
EndpointName string
3232
WorkspaceName string
3333
}
3434

3535
func (e *ServiceConflictError) Error() string {
36-
if (e.WorkspaceName == "") {
36+
if e.WorkspaceName == "" {
3737
return fmt.Sprintf("discoverable endpoint '%s' is already in use by another workspace", e.EndpointName)
3838
}
3939
return fmt.Sprintf("discoverable endpoint '%s' is already in use by workspace '%s'", e.EndpointName, e.WorkspaceName)

webhook/workspace/handler/validate.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ func (h *WebhookHandler) validateEndpoints(ctx context.Context, workspace *dwv2.
124124
for _, endpoint := range component.Container.Endpoints {
125125
if discoverableEndpoints[endpoint.Name] {
126126
return &solvers.ServiceConflictError{
127-
EndpointName: endpoint.Name,
127+
EndpointName: endpoint.Name,
128128
WorkspaceName: otherWorkspace.Name,
129129
}
130130
}

0 commit comments

Comments
 (0)