mirror of
https://github.com/andwati/telecom-platform.git
synced 2026-11-02 18:02:20 +00:00
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:
@@ -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))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user