From 41c58a42d5e522ce9ddd9edbd753b094d23019f5 Mon Sep 17 00:00:00 2001 From: donald1218 Date: Wed, 6 Nov 2024 06:38:25 +0000 Subject: [PATCH] fix: remove unused var and misspell and update openapi hash --- go.mod | 2 +- go.sum | 4 ++-- internal/sbi/consumer/nssf_service.go | 6 ++---- internal/sbi/processor/notifier/subscription.go | 4 ++-- 4 files changed, 7 insertions(+), 9 deletions(-) diff --git a/go.mod b/go.mod index dc3114e..23af159 100644 --- a/go.mod +++ b/go.mod @@ -8,7 +8,7 @@ require ( github.com/free5gc/aper v1.0.6-0.20240503143507-2c4c4780b98f github.com/free5gc/nas v1.1.4-0.20240801045646-998afcbf3811 github.com/free5gc/ngap v1.0.9-0.20240801044503-4db04dae3900 - github.com/free5gc/openapi v1.0.9-0.20241024114001-1414ef920de2 + github.com/free5gc/openapi v1.0.9-0.20241105014927-c376b9f16133 github.com/free5gc/sctp v1.0.1 github.com/free5gc/util v1.0.6 github.com/gin-gonic/gin v1.9.1 diff --git a/go.sum b/go.sum index 9827bf6..50262ae 100644 --- a/go.sum +++ b/go.sum @@ -27,8 +27,8 @@ github.com/free5gc/nas v1.1.4-0.20240801045646-998afcbf3811 h1:S/4FPVGQm4xYNxRLd github.com/free5gc/nas v1.1.4-0.20240801045646-998afcbf3811/go.mod h1:mVpI5guYTI24b9/cqnzilfHZa5nQeiLAh39/pVz9WrI= github.com/free5gc/ngap v1.0.9-0.20240801044503-4db04dae3900 h1:ZElji98JSdDEJuUtpHGuV0L+xCY5ePs3YolqVfDR9Ig= github.com/free5gc/ngap v1.0.9-0.20240801044503-4db04dae3900/go.mod h1:HedQCbA/XoFgO3wnNSNhIpp5Dhv0f42lLMT/EiEyAQ0= -github.com/free5gc/openapi v1.0.9-0.20241024114001-1414ef920de2 h1:rMZE/FZtEbOiAZISVs9M093g4I2SGdpcxDYp2htt6Ws= -github.com/free5gc/openapi v1.0.9-0.20241024114001-1414ef920de2/go.mod h1:aKw6uGzEibGDrn9++w4/JpWxaaUBo7GaqsvuFKU9fl4= +github.com/free5gc/openapi v1.0.9-0.20241105014927-c376b9f16133 h1:kteBxWKtc15ngTG+BmGBTpW4xIddxPde01TlmcHcngg= +github.com/free5gc/openapi v1.0.9-0.20241105014927-c376b9f16133/go.mod h1:aKw6uGzEibGDrn9++w4/JpWxaaUBo7GaqsvuFKU9fl4= github.com/free5gc/sctp v1.0.1 h1:g8WDO97r8B9ubkT5Hyk9b4I1fZUOii9Z39gQ2eRaASo= github.com/free5gc/sctp v1.0.1/go.mod h1:7QXfRWCmlkBGD0EIu3qL5o71bslfIakydz4h2QDZdjQ= github.com/free5gc/util v1.0.6 h1:dBt9drcXtYKE/cY5XuQcuffgsYclPIpIArhSeS6M+DQ= diff --git a/internal/sbi/consumer/nssf_service.go b/internal/sbi/consumer/nssf_service.go index f83f4a7..ea5b861 100644 --- a/internal/sbi/consumer/nssf_service.go +++ b/internal/sbi/consumer/nssf_service.go @@ -67,10 +67,9 @@ func (s *nssfService) NSSelectionGetForRegistration(ue *amf_context.AmfUe, reque var paramOpt Nnssf_NSSelection.NSSelectionGetRequest testNfType := models.NrfNfManagementNfType_AMF - test := &testNfType paramOpt = Nnssf_NSSelection.NSSelectionGetRequest{ - NfType: test, + NfType: &testNfType, NfId: &amfSelf.NfId, SliceInfoRequestForRegistration: &sliceInfo, Tai: &ue.Tai, // TS 29.531 R15.3 6.1.3.2.3.1 @@ -111,10 +110,9 @@ func (s *nssfService) NSSelectionGetForPduSession(ue *amf_context.AmfUe, snssai } testNfType := models.NrfNfManagementNfType_AMF - test := &testNfType paramOpt := Nnssf_NSSelection.NSSelectionGetRequest{ - NfType: test, + NfType: &testNfType, NfId: &amfSelf.NfId, SliceInfoRequestForPduSession: &sliceInfoForPduSession, Tai: &ue.Tai, // TS 29.531 R15.3 6.1.3.2.3.1 diff --git a/internal/sbi/processor/notifier/subscription.go b/internal/sbi/processor/notifier/subscription.go index 3504bf7..b23743d 100644 --- a/internal/sbi/processor/notifier/subscription.go +++ b/internal/sbi/processor/notifier/subscription.go @@ -39,12 +39,12 @@ func SendAmfStatusChangeNotify(amfStatus string, guamiList []models.Guami) { amfStatusNotification.AmfStatusInfoList = append(amfStatusNotification.AmfStatusInfoList, amfStatusInfo) uri := subscriptionData.AmfStatusUri - amfStatusNotificationReq := Namf_Communication.AmfStatusChangeNOtifyRequest{ + amfStatusNotificationReq := Namf_Communication.AmfStatusChangeNotifyRequest{ AmfStatusChangeNotification: &amfStatusNotification, } logger.ProducerLog.Infof("[AMF] Send Amf Status Change Notify to %s", uri) _, err := client.IndividualSubscriptionDocumentApi. - AmfStatusChangeNOtify(context.Background(), uri, &amfStatusNotificationReq) + AmfStatusChangeNotify(context.Background(), uri, &amfStatusNotificationReq) if err != nil { HttpLog.Errorln(err.Error()) }