Skip to content

Use accessors (new, get, set) instead of direct field access#152

Merged
gab-arrobo merged 2 commits into
omec-project:mainfrom
gab-arrobo:use-accessors
Jun 6, 2026
Merged

Use accessors (new, get, set) instead of direct field access#152
gab-arrobo merged 2 commits into
omec-project:mainfrom
gab-arrobo:use-accessors

Conversation

@gab-arrobo

Copy link
Copy Markdown
Contributor

No description provided.

Signed-off-by: Arrobo, Gabriel <gabriel.arrobo@intel.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates Go code to rely on generated model constructors/setters (instead of struct literals/direct field assignment) and modernizes heap interface method signatures to use any.

Changes:

  • Update NfProfilePriorityQ heap-related method signatures from interface{} to any.
  • Refactor AMF profile test setup to use models.NewNFProfileDiscovery(...) plus setter methods, and adjust the MatchAmfProfile call to pass a pointer.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
nrfcache/nrfcache.go Switch heap/queue method signatures to any (Go 1.18+ alias) for consistency with modern Go typing.
nrfcache/nrfcache_test.go Use generated constructor and setters for NFProfileDiscovery in AMF matching tests; pass the profile pointer to MatchAmfProfile.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread nrfcache/nrfcache.go Outdated
Signed-off-by: Arrobo, Gabriel <gabriel.arrobo@intel.com>
@gab-arrobo gab-arrobo merged commit f46a016 into omec-project:main Jun 6, 2026
9 checks passed
@gab-arrobo gab-arrobo deleted the use-accessors branch June 6, 2026 04:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants