refactor: Replace interface{} with any type alias across codebase

- Replace interface{} with any in api_integration_test.go makeRequest method and test response maps
- Replace interface{} with any in logging.go WithField method and all logging function signatures
- Replace interface{} with any in middleware etag.go sync.Map.Range callback
- Replace interface{} with any in middleware redis_ratelimit.go RedisClientInterface and result parsing
- Replace interface{} with any in middleware redis_ratelimit_
This commit is contained in:
nutcas3
2026-04-25 06:31:02 +03:00
parent cfd5ca63cf
commit 6cf546712b
12 changed files with 117 additions and 129 deletions
+14 -14
View File
@@ -11,9 +11,9 @@ var Logger *logrus.Logger
// Config holds logging configuration
type Config struct {
Level string
Format string // "json" or "text"
Output string // "stdout" or "stderr"
Level string
Format string // "json" or "text"
Output string // "stdout" or "stderr"
}
// DefaultConfig returns default logging configuration
@@ -76,7 +76,7 @@ func InitWithDefaults() error {
}
// WithField returns a logger with a single field
func WithField(key string, value interface{}) *logrus.Entry {
func WithField(key string, value any) *logrus.Entry {
return Logger.WithField(key, value)
}
@@ -91,51 +91,51 @@ func WithError(err error) *logrus.Entry {
}
// Info logs an info message
func Info(args ...interface{}) {
func Info(args ...any) {
Logger.Info(args...)
}
// Infof logs a formatted info message
func Infof(format string, args ...interface{}) {
func Infof(format string, args ...any) {
Logger.Infof(format, args...)
}
// Warn logs a warning message
func Warn(args ...interface{}) {
func Warn(args ...any) {
Logger.Warn(args...)
}
// Warnf logs a formatted warning message
func Warnf(format string, args ...interface{}) {
func Warnf(format string, args ...any) {
Logger.Warnf(format, args...)
}
// Error logs an error message
func Error(args ...interface{}) {
func Error(args ...any) {
Logger.Error(args...)
}
// Errorf logs a formatted error message
func Errorf(format string, args ...interface{}) {
func Errorf(format string, args ...any) {
Logger.Errorf(format, args...)
}
// Fatal logs a fatal message and exits
func Fatal(args ...interface{}) {
func Fatal(args ...any) {
Logger.Fatal(args...)
}
// Fatalf logs a formatted fatal message and exits
func Fatalf(format string, args ...interface{}) {
func Fatalf(format string, args ...any) {
Logger.Fatalf(format, args...)
}
// Debug logs a debug message
func Debug(args ...interface{}) {
func Debug(args ...any) {
Logger.Debug(args...)
}
// Debugf logs a formatted debug message
func Debugf(format string, args ...interface{}) {
func Debugf(format string, args ...any) {
Logger.Debugf(format, args...)
}