From 6c2a59502cc1ead0190a21b7c38892f74bb34a56 Mon Sep 17 00:00:00 2001 From: Francesco Ilario Date: Mon, 15 Jul 2024 10:51:27 +0200 Subject: [PATCH] return empty slice instead of nil Signed-off-by: Francesco Ilario --- pkg/proxy/handlers/spacelister_list.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/proxy/handlers/spacelister_list.go b/pkg/proxy/handlers/spacelister_list.go index bf170f18..8f7035e7 100644 --- a/pkg/proxy/handlers/spacelister_list.go +++ b/pkg/proxy/handlers/spacelister_list.go @@ -42,13 +42,13 @@ func ListUserWorkspaces(ctx echo.Context, spaceLister *SpaceLister) ([]toolchain } // signup is not ready if signup == nil { - return nil, nil + return []toolchainv1alpha1.Workspace{}, nil } // get MUR Names murNames := getMURNamesForList(ctx, signup) if len(murNames) == 0 { - return nil, nil + return []toolchainv1alpha1.Workspace{}, nil } // get all spacebindings with given mur since no workspace was provided