From fd1fb9298bc05c570ab75378a5e923aab598264c Mon Sep 17 00:00:00 2001 From: mohamedch7 <121046693+mohamedch7@users.noreply.github.com> Date: Thu, 19 Dec 2024 13:44:04 +0100 Subject: [PATCH] chore: remove lint warnings by cleaning up comments and formatting --- workspaces/backend/api/workspaces_handler_test.go | 2 +- workspaces/backend/internal/models/workspaces.go | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/workspaces/backend/api/workspaces_handler_test.go b/workspaces/backend/api/workspaces_handler_test.go index 240f0d33..7d5ceffe 100644 --- a/workspaces/backend/api/workspaces_handler_test.go +++ b/workspaces/backend/api/workspaces_handler_test.go @@ -495,7 +495,7 @@ var _ = Describe("Workspaces Handler", func() { err = json.Unmarshal(body, &response) Expect(err).NotTo(HaveOccurred(), "Error unmarshalling response JSON") - //remove auto generated fields from comparison + // remove auto generated fields from comparison response.Data.Activity.LastActivity = 0 By("checking if the retrieved workspace matches the expected workspace") diff --git a/workspaces/backend/internal/models/workspaces.go b/workspaces/backend/internal/models/workspaces.go index bf0965bb..47aea81a 100644 --- a/workspaces/backend/internal/models/workspaces.go +++ b/workspaces/backend/internal/models/workspaces.go @@ -13,6 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ + package models import ( @@ -92,9 +93,6 @@ type DataVolumeModel struct { } func NewWorkspaceModelFromWorkspace(ctx context.Context, cl client.Client, item *kubefloworgv1beta1.Workspace) WorkspaceModel { - // t := time.Unix(item.Status.Activity.LastActivity, 0) - // formattedLastActivity := t.Format("2006-01-02 15:04:05 MST") - wsk := &kubefloworgv1beta1.WorkspaceKind{} if err := cl.Get(ctx, client.ObjectKey{Name: item.Spec.Kind}, wsk); err != nil { return WorkspaceModel{}