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
+2 -8
View File
@@ -1,9 +1,9 @@
package types
import (
"slices"
"fmt"
"net/url"
"slices"
"strings"
)
@@ -51,13 +51,7 @@ func (c *CLIConfig) Validate() []error {
// Validate theme
validThemes := []string{"default", "light", "dark", "high-contrast"}
if c.Theme != "" {
valid := false
for _, t := range validThemes {
if c.Theme == t {
valid = true
break
}
}
valid := slices.Contains(validThemes, c.Theme)
if !valid {
errors = append(errors, fmt.Errorf("invalid theme '%s', must be one of: %v", c.Theme, validThemes))
}