Remove dead code and tested changes using OnRamp#148
Merged
gab-arrobo merged 3 commits intoomec-project:mainfrom Mar 9, 2026
Merged
Remove dead code and tested changes using OnRamp#148gab-arrobo merged 3 commits intoomec-project:mainfrom
gab-arrobo merged 3 commits intoomec-project:mainfrom
Conversation
Signed-off-by: Arrobo, Gabriel <[email protected]>
There was a problem hiding this comment.
Pull request overview
This PR focuses on removing unused (“dead”) functions across the N3IWF codebase, primarily in NGAP message building/sending helpers, logger and security algorithm helpers, and some test/example utilities.
Changes:
- Removed multiple unused NGAP message send/build helper functions (e.g., NGReset, NAS NonDelivery, PDU session notify/modify indication).
- Removed unused exported helpers across packages (logger accessors, CLI arg filtering, security string-to-type helpers, packet getters).
- Adjusted several NGAP event handler function signatures and removed some NGAP event
Type()/constructor helpers.
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| service/init.go | Removes unused CLI flag filtering helper. |
| ngap/message/send.go | Drops unused NGAP send wrappers. |
| ngap/message/build.go | Drops unused NGAP PDU builders. |
| ngap/handler/handler.go | Changes several handler function parameter types to any. |
| logger/logger.go | Removes unused exported GetLogger. |
| ike/service/service_test.go | Removes an unused Go example function from tests. |
| ike/security/prf/prf.go | Removes unused PRF string-to-type helper. |
| ike/security/integ/integ.go | Removes unused INTEG string-to-type helpers. |
| ike/security/dh/dh.go | Removes unused DH string-to-type helper. |
| gtp/message/message.go | Removes unused TPDU extension header getter. |
| gre/message/message.go | Removes unused GRE packet getters. |
| context/ranue.go | Removes unused shared context constructor. |
| context/ngap.go | Removes Type()/constructor helpers for several NGAP event structs. |
Comments suppressed due to low confidence (1)
ngap/handler/handler.go:3017
HandleSendUEContextReleaseCompletenow takesanybut is still called fromHandleEvent(ngapEvent context.NgapEvt). This weakens compile-time guarantees and makes the immediate type assertion (ngapEvent.(*context.SendUEContextReleaseCompleteEvt)) more fragile (panic on mismatched payload). Prefer keeping the parameter typed ascontext.NgapEvtfor consistency with other handlers, or migrate the whole NGAP event pipeline (channel +HandleEvent) toany/type-switch and use a checked assertion with logging.
func HandleSendUEContextReleaseComplete(ngapEvent any) {
logger.NgapLog.Debugln("handle SendUEContextReleaseComplete Event")
evt := ngapEvent.(*context.SendUEContextReleaseCompleteEvt)
ranUeNgapId := evt.RanUeNgapId
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Arrobo, Gabriel <[email protected]>
Signed-off-by: Arrobo, Gabriel <[email protected]>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 11 out of 11 changed files in this pull request and generated 10 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.