Skip to content

Update codebase to replace interface{} with any as suggested by GO#194

Merged
gab-arrobo merged 1 commit intoomec-project:mainfrom
gab-arrobo:modernized-codebase
Oct 10, 2025
Merged

Update codebase to replace interface{} with any as suggested by GO#194
gab-arrobo merged 1 commit intoomec-project:mainfrom
gab-arrobo:modernized-codebase

Conversation

@gab-arrobo
Copy link
Copy Markdown
Contributor

Changes were tested using OnRamp through the replace directive in the amf image

Signed-off-by: Arrobo, Gabriel <gabriel.arrobo@intel.com>
@gab-arrobo gab-arrobo requested review from a team and Copilot October 10, 2025 06:16
Copy link
Copy Markdown

Copilot AI left a comment

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 replaces all instances of interface{} with any throughout the MongoDB API client codebase, aligning with Go's modern type alias introduced in Go 1.18.

  • Updates function signatures to use any instead of interface{}
  • Modernizes type declarations for better readability
  • Maintains backward compatibility while following current Go best practices

Reviewed Changes

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

Show a summary per file
File Description
mongoapi/mongoapi.go Updated all MongoDB API function signatures and variable declarations to use any
mongoapi/dbadapter.go Updated database interface definitions and adapter methods to use any
idgenerator/idgenerator_test.go Updated sync.Map range function parameter to use any
httpwrapper/httpwrapper.go Updated HTTP request/response struct fields and constructor parameters to use any
flowdesc/ip_filter_rule.go Updated variadic function parameter to use any

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@gab-arrobo gab-arrobo changed the title Update codebase ti replace interface with any as suggested by GO Update codebase to replace interface{} with any as suggested by GO Oct 10, 2025
@gab-arrobo gab-arrobo merged commit 4cee1b7 into omec-project:main Oct 10, 2025
7 checks passed
@gab-arrobo gab-arrobo deleted the modernized-codebase branch October 10, 2025 06:24
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