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
@@ -147,8 +147,8 @@ func TestAutomationService_Create(t *testing.T) {
_, service := setupAutomationTest(t)
t.Run("Create automation successfully", func(t *testing.T) {
definition := map[string]interface{}{
"actions": []map[string]interface{}{
definition := map[string]any{
"actions": []map[string]any{
{
"type": "restart",
"target": "service",
@@ -313,7 +313,7 @@ func BenchmarkAutomationService_List(b *testing.B) {
db, service := setupAutomationTest(&testing.T{})
// Create test automations
for i := 0; i < 100; i++ {
for i := range 100 {
automation := models.Automation{
Name: fmt.Sprintf("automation-%d", i),
Description: "Test automation",
@@ -110,7 +110,7 @@ func TestPluginService_Install(t *testing.T) {
_, service := setupPluginTest(t)
t.Run("Install new plugin successfully", func(t *testing.T) {
configJSON, _ := json.Marshal(map[string]interface{}{"key": "value"})
configJSON, _ := json.Marshal(map[string]any{"key": "value"})
input := InstallPluginInput{
Name: "new-plugin",
Version: "1.0.0",
@@ -235,7 +235,7 @@ func BenchmarkPluginService_List(b *testing.B) {
db, service := setupPluginTest(&testing.T{})
// Create test plugins
for i := 0; i < 100; i++ {
for i := range 100 {
plugin := models.Plugin{
Name: fmt.Sprintf("plugin-%d", i),
Version: "1.0.0",