Skip to content

refactor: replace interface{} with any for clarity and modernization#239

Merged
mrproliu merged 1 commit intoapache:mainfrom
jiangmencity:main
Feb 10, 2026
Merged

refactor: replace interface{} with any for clarity and modernization#239
mrproliu merged 1 commit intoapache:mainfrom
jiangmencity:main

Conversation

@jiangmencity
Copy link
Contributor

This change replaces occurrences of interface{} with the predeclared identifier any, introduced in Go 1.18 as an alias for interface{}.

As noted in the Go 1.18 Release Notes:
This improves readability and aligns the codebase with modern Go conventions.

Signed-off-by: jiangmencity <jiangmen@52it.net>
Copy link

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

Refactors the public log.Logger interface to use Go 1.18+ any in place of interface{} to modernize type signatures and improve readability.

Changes:

  • Replace interface{} with any in Logger.WithField and variadic logging methods (Info, Warn, Error, and *f variants).

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

Comment on lines +21 to +23
WithField(key string, value any) Logger
// Info logs to the INFO log.
Info(args ...interface{})
Info(args ...any)
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

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

PR title/description suggests a broad replacement of interface{} with any across the codebase, but this PR (at least in the changes shown) only updates the log.Logger interface. Consider updating the PR description/title to reflect the narrower scope, or expanding the refactor to cover the remaining interface{} usages if that was the intent.

Copilot uses AI. Check for mistakes.
@mrproliu mrproliu merged commit 924fc32 into apache:main Feb 10, 2026
48 of 49 checks passed
@wu-sheng wu-sheng added this to the 0.7.0 milestone Feb 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants