From 47e85844f5094e92e9cb7ea6ebce822e7ee58f71 Mon Sep 17 00:00:00 2001 From: Deepak Bhagat Date: Mon, 20 Jul 2026 14:49:39 +0530 Subject: [PATCH] chore: replace redundant boolean closure in makeAppStageStatus with id > 0 makeAppStageStatus built the Status field with an inline anonymous function returning true/false from an if id > 0 block. Status is a bool, so the closure is equivalent to the expression id > 0. Replace it with Status: id > 0. Signed-off-by: Deepak Bhagat --- pkg/app/appDetails/read/AppDetailsReadService.go | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/pkg/app/appDetails/read/AppDetailsReadService.go b/pkg/app/appDetails/read/AppDetailsReadService.go index d3b4014564..85104a1cce 100644 --- a/pkg/app/appDetails/read/AppDetailsReadService.go +++ b/pkg/app/appDetails/read/AppDetailsReadService.go @@ -142,13 +142,7 @@ func (impl *AppDetailsReadServiceImpl) makeAppStageStatus(stage int, stageName s return AppView.AppStageStatus{ Stage: stage, StageName: stageName, - Status: func() bool { - if id > 0 { - return true - } else { - return false - } - }(), - Required: isRequired, + Status: id > 0, + Required: isRequired, } }