From 443fa5f1ece28b9695ee8ce83b39bcf1f32e94fc Mon Sep 17 00:00:00 2001 From: saileshvvr Date: Sun, 4 Feb 2024 21:59:03 +0530 Subject: [PATCH] fix lint error --- internal/sbi/consumer/subscriber_data_management.go | 2 +- internal/sbi/producer/pdu_session.go | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/internal/sbi/consumer/subscriber_data_management.go b/internal/sbi/consumer/subscriber_data_management.go index 0157aed3..e4470a00 100644 --- a/internal/sbi/consumer/subscriber_data_management.go +++ b/internal/sbi/consumer/subscriber_data_management.go @@ -17,7 +17,7 @@ func SDMGetSmData(smCtx *smf_context.SMContext, smPlmnID *models.PlmnId, ) (problemDetails *models.ProblemDetails, err error) { // Query UDM - if problemDetails, err := SendNFDiscoveryUDM(); err != nil { + if problemDetails, err = SendNFDiscoveryUDM(); err != nil { smCtx.Log.Warnf("Send NF Discovery Serving UDM Error[%v]", err) } else if problemDetails != nil { smCtx.Log.Warnf("Send NF Discovery Serving UDM Problem[%+v]", problemDetails) diff --git a/internal/sbi/producer/pdu_session.go b/internal/sbi/producer/pdu_session.go index 8d9c807a..ee7534af 100644 --- a/internal/sbi/producer/pdu_session.go +++ b/internal/sbi/producer/pdu_session.go @@ -96,7 +96,7 @@ func HandlePDUSessionSMContextCreate(isDone <-chan struct{}, } establishmentRequest := m.PDUSessionEstablishmentRequest - if err := HandlePDUSessionEstablishmentRequest(smContext, establishmentRequest); err != nil { + if err = HandlePDUSessionEstablishmentRequest(smContext, establishmentRequest); err != nil { smContext.Log.Errorf("PDU Session Establishment fail by %s", err) gsmError := &GSMError{} if errors.As(err, &gsmError) { @@ -110,7 +110,7 @@ func HandlePDUSessionSMContextCreate(isDone <-chan struct{}, } // Discover and new Namf_Comm client for use later - if problemDetails, err := consumer.SendNFDiscoveryServingAMF(smContext); err != nil { + if problemDetails, err = consumer.SendNFDiscoveryServingAMF(smContext); err != nil { smContext.Log.Warnf("Send NF Discovery Serving AMF Error[%v]", err) } else if problemDetails != nil { smContext.Log.Warnf("Send NF Discovery Serving AMF Problem[%+v]", problemDetails) @@ -126,7 +126,7 @@ func HandlePDUSessionSMContextCreate(isDone <-chan struct{}, } } - if err := smContext.AllocUeIP(); err != nil { + if err = smContext.AllocUeIP(); err != nil { smContext.SetState(smf_context.InActive) smContext.Log.Errorf("PDUSessionSMContextCreate err: %v", err) return makeEstRejectResAndReleaseSMContext(smContext, @@ -134,7 +134,7 @@ func HandlePDUSessionSMContextCreate(isDone <-chan struct{}, &Nsmf_PDUSession.InsufficientResourceSliceDnn) } - if err := smContext.PCFSelection(); err != nil { + if err = smContext.PCFSelection(); err != nil { smContext.Log.Errorln("pcf selection error:", err) }