From d6ec27e49a0e6da3f138c7b6d99458aaa3019b0a Mon Sep 17 00:00:00 2001 From: donald1218 Date: Thu, 17 Oct 2024 08:45:00 +0000 Subject: [PATCH] fix: lint error and miss nftype in searchnf --- internal/sbi/consumer/nrf_service.go | 6 ++++-- internal/sbi/server.go | 1 - 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/internal/sbi/consumer/nrf_service.go b/internal/sbi/consumer/nrf_service.go index 5dcd806..cc5130e 100644 --- a/internal/sbi/consumer/nrf_service.go +++ b/internal/sbi/consumer/nrf_service.go @@ -75,6 +75,8 @@ func (s *nnrfService) SendSearchNFInstances(nrfUri string, targetNfType, request param *Nnrf_NFDiscovery.SearchNFInstancesRequest, ) (*models.SearchResult, error) { // Set client and set url + param.TargetNfType = &targetNfType + param.RequesterNfType = &requestNfType client := s.getNFDiscClient(nrfUri) if client == nil { return nil, openapi.ReportError("nrf not found") @@ -239,7 +241,8 @@ func (s *nnrfService) BuildNFInstance(context *amf_context.AMFContext) ( return profile, err } -func (s *nnrfService) SendRegisterNFInstance(ctx context.Context, nrfUri, nfInstanceId string, profile *models.NrfNfManagementNfProfile) ( +func (s *nnrfService) SendRegisterNFInstance(ctx context.Context, nrfUri, nfInstanceId string, + profile *models.NrfNfManagementNfProfile) ( resouceNrfUri string, retrieveNfInstanceId string, err error, ) { // Set client and set url @@ -294,7 +297,6 @@ func (s *nnrfService) SendRegisterNFInstance(ctx context.Context, nrfUri, nfInst } finish = true } - } } return resouceNrfUri, retrieveNfInstanceId, err diff --git a/internal/sbi/server.go b/internal/sbi/server.go index 279f327..c7b9e7e 100644 --- a/internal/sbi/server.go +++ b/internal/sbi/server.go @@ -136,7 +136,6 @@ func newRouter(s *Server) *gin.Engine { } func (s *Server) Run(traceCtx context.Context, wg *sync.WaitGroup) error { - wg.Add(1) go s.startServer(wg)