feat(quality): fix duplicates and modernize

This commit is contained in:
2026-03-15 09:43:16 +01:00
parent 613baaf229
commit f175416ac2

View File

@@ -3,13 +3,13 @@ package generator
import ( import (
"fmt" "fmt"
"os" "os"
"slices"
"strings" "strings"
"testing" "testing"
"katenary.io/internal/generator/labels" "katenary.io/internal/generator/labels"
yaml3 "gopkg.in/yaml.v3" yaml3 "gopkg.in/yaml.v3"
appsv1 "k8s.io/api/apps/v1"
v1 "k8s.io/api/apps/v1" v1 "k8s.io/api/apps/v1"
corev1 "k8s.io/api/core/v1" corev1 "k8s.io/api/core/v1"
rbacv1 "k8s.io/api/rbac/v1" rbacv1 "k8s.io/api/rbac/v1"
@@ -780,7 +780,7 @@ services:
output := internalCompileTest(t, "-s", "templates/web/deployment.yaml") output := internalCompileTest(t, "-s", "templates/web/deployment.yaml")
var dt appsv1.Deployment var dt v1.Deployment
if err := yaml.Unmarshal([]byte(output), &dt); err != nil { if err := yaml.Unmarshal([]byte(output), &dt); err != nil {
t.Errorf("Failed to unmarshal Deployment: %v", err) t.Errorf("Failed to unmarshal Deployment: %v", err)
} }
@@ -832,10 +832,5 @@ services:
} }
func contains(slice []string, item string) bool { func contains(slice []string, item string) bool {
for _, s := range slice { return slices.Contains(slice, item)
if s == item {
return true
}
}
return false
} }