@@ -1398,7 +1398,7 @@ func (service *HTTPRestService) GetIPFamilyCount() int {
13981398== == == =
13991399func (service * HTTPRestService ) DeleteEndpointStateHandler (w http .ResponseWriter , r * http .Request ) {
14001400 opName := "DeleteEndpointStateHandler"
1401- logger .Printf ("[DeleteEndpointStateHandler] DeleteEndpointState for %s" , r .URL .Path )
1401+ logger .Printf ("[DeleteEndpointStateHandler] DeleteEndpointState for %s" , r .URL .Path ) //nolint:staticcheck
14021402 endpointID := strings .TrimPrefix (r .URL .Path , cns .EndpointPath )
14031403
14041404 if service .EndpointStateStore == nil {
@@ -1407,15 +1407,15 @@ func (service *HTTPRestService) DeleteEndpointStateHandler(w http.ResponseWriter
14071407 Message : "[DeleteEndpointStateHandler] EndpointStateStore is not initialized" ,
14081408 }
14091409 err := common .Encode (w , & response )
1410- logger .Response (opName , response , response .ReturnCode , err )
1410+ logger .Response (opName , response , response .ReturnCode , err ) //nolint:staticcheck
14111411 return
14121412 }
14131413
14141414 // Decode the request body to get ipInfo if needed
14151415 var req map [string ]* IPInfo
14161416 err := common .Decode (w , r , & req )
14171417 if err != nil {
1418- logger .Printf ("[DeleteEndpointStateHandler] Failed to decode request body: %v" , err )
1418+ logger .Printf ("[DeleteEndpointStateHandler] Failed to decode request body: %v" , err ) //nolint:staticcheck
14191419 // Continue with deletion even if decode fails, as ipInfo might not be needed
14201420 }
14211421
@@ -1427,7 +1427,7 @@ func (service *HTTPRestService) DeleteEndpointStateHandler(w http.ResponseWriter
14271427 Message : fmt .Sprintf ("[DeleteEndpointStateHandler] Failed to delete endpoint state for %s with error: %s" , endpointID , err .Error ()),
14281428 }
14291429 err = common .Encode (w , & response )
1430- logger .Response (opName , response , response .ReturnCode , err )
1430+ logger .Response (opName , response , response .ReturnCode , err ) //nolint:staticcheck
14311431 return
14321432 }
14331433
@@ -1436,17 +1436,17 @@ func (service *HTTPRestService) DeleteEndpointStateHandler(w http.ResponseWriter
14361436 Message : "[DeleteEndpointStateHandler] Endpoint state deleted successfully" ,
14371437 }
14381438 err = common .Encode (w , & response )
1439- logger .Response (opName , response , response .ReturnCode , err )
1439+ logger .Response (opName , response , response .ReturnCode , err ) //nolint:staticcheck
14401440}
14411441
14421442func (service * HTTPRestService ) DeleteEndpointStateHelper (endpointID string ) error {
14431443 if service .EndpointStateStore == nil {
14441444 return ErrStoreEmpty
14451445 }
1446- logger .Printf ("[deleteEndpointState] Deleting Endpoint state from state file %s" , endpointID )
1446+ logger .Printf ("[deleteEndpointState] Deleting Endpoint state from state file %s" , endpointID ) //nolint:staticcheck
14471447 _ , endpointExist := service .EndpointState [endpointID ]
14481448 if ! endpointExist {
1449- logger .Printf ("[deleteEndpointState] endpoint could not be found in the statefile %s" , endpointID )
1449+ logger .Printf ("[deleteEndpointState] endpoint could not be found in the statefile %s" , endpointID ) //nolint:staticcheck
14501450 return fmt .Errorf ("[deleteEndpointState] endpoint %s: %w" , endpointID , ErrEndpointStateNotFound )
14511451 }
14521452
@@ -1458,7 +1458,7 @@ func (service *HTTPRestService) DeleteEndpointStateHelper(endpointID string) err
14581458 if err != nil {
14591459 return fmt .Errorf ("[deleteEndpointState] failed to write endpoint state to store: %w" , err )
14601460 }
1461- logger .Printf ("[deleteEndpointState] successfully deleted endpoint %s from state file" , endpointID )
1461+ logger .Printf ("[deleteEndpointState] successfully deleted endpoint %s from state file" , endpointID ) //nolint:staticcheck
14621462 return nil
14631463>> >> >> > 79 f3d9a0d (feat : Implement DeleteEndpointState API and integrate with network manager )
14641464}
0 commit comments