mirror of
https://github.com/kubernetes/client-go.git
synced 2026-05-14 19:17:56 +00:00
Merge pull request #137497 from atombrella/feature/modernize_activate_forvar
Lint: Activate modernize/forvar rule in golangci-lint. Kubernetes-commit: 090693bd79c405df9122179f5e399adf77b8c023
This commit is contained in:
2
go.mod
2
go.mod
@@ -24,7 +24,7 @@ require (
|
||||
google.golang.org/protobuf v1.36.12-0.20260120151049-f2248ac996af
|
||||
gopkg.in/evanphx/json-patch.v4 v4.13.0
|
||||
k8s.io/api v0.0.0-20260306202102-9f7831c403c9
|
||||
k8s.io/apimachinery v0.0.0-20260306081630-647784e3f84c
|
||||
k8s.io/apimachinery v0.0.0-20260309083111-0366c6fdd24f
|
||||
k8s.io/klog/v2 v2.130.1
|
||||
k8s.io/kube-openapi v0.0.0-20260304202019-5b3e3fdb0acf
|
||||
k8s.io/utils v0.0.0-20260210185600-b8788abfbbc2
|
||||
|
||||
4
go.sum
4
go.sum
@@ -125,8 +125,8 @@ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
||||
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
k8s.io/api v0.0.0-20260306202102-9f7831c403c9 h1:SkVDnJR0yR5Nzyd2ag3PxNqPSxGrKj0/dDRCJbmSWLk=
|
||||
k8s.io/api v0.0.0-20260306202102-9f7831c403c9/go.mod h1:c5/X+3BzwOR8e8Tp0Mmb8vIR+8qb15ndtumwdYhVfro=
|
||||
k8s.io/apimachinery v0.0.0-20260306081630-647784e3f84c h1:RoUd31LCDoEFVv903GyxlVxoiF63LVg6h5eGnhbj+jw=
|
||||
k8s.io/apimachinery v0.0.0-20260306081630-647784e3f84c/go.mod h1:BRZJp+rI0KQ4rFG0tVMWDQlu2NrN/ym/0cFc2m06TcI=
|
||||
k8s.io/apimachinery v0.0.0-20260309083111-0366c6fdd24f h1:pgOQdWt6zHX9urBxCR6yTxVHqWpQhBd9zCWZpw8CoME=
|
||||
k8s.io/apimachinery v0.0.0-20260309083111-0366c6fdd24f/go.mod h1:BRZJp+rI0KQ4rFG0tVMWDQlu2NrN/ym/0cFc2m06TcI=
|
||||
k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk=
|
||||
k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE=
|
||||
k8s.io/kube-openapi v0.0.0-20260304202019-5b3e3fdb0acf h1:btPscg4cMql0XdYK2jLsJcNEKmACJz8l+U7geC06FiM=
|
||||
|
||||
@@ -192,7 +192,6 @@ func TestConfigToExecCluster(t *testing.T) {
|
||||
},
|
||||
}
|
||||
for _, test := range tests {
|
||||
test := test
|
||||
t.Run(test.name, func(t *testing.T) {
|
||||
out, err := ConfigToExecCluster(&test.in)
|
||||
if test.wantErrorPrefix != "" {
|
||||
|
||||
@@ -128,7 +128,6 @@ uml0obOEy+ON91k+SWTJ3ggmF/U=
|
||||
var wg sync.WaitGroup
|
||||
|
||||
for _, tt := range configurations {
|
||||
tt := tt
|
||||
wg.Add(1)
|
||||
go func() {
|
||||
defer wg.Done()
|
||||
|
||||
@@ -254,7 +254,6 @@ func TestLoadExecCredential(t *testing.T) {
|
||||
},
|
||||
}
|
||||
for _, test := range tests {
|
||||
test := test
|
||||
t.Run(test.name, func(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
|
||||
@@ -35,7 +35,6 @@ func TestClientAuthenticationClusterTypesAreSynced(t *testing.T) {
|
||||
clientauthenticationv1beta1.Cluster{},
|
||||
clientauthenticationv1.Cluster{},
|
||||
} {
|
||||
cluster := cluster
|
||||
t.Run(fmt.Sprintf("%T", cluster), func(t *testing.T) {
|
||||
t.Parallel()
|
||||
testClientAuthenticationClusterTypesAreSynced(t, cluster)
|
||||
|
||||
2
tools/cache/delta_fifo_test.go
vendored
2
tools/cache/delta_fifo_test.go
vendored
@@ -278,8 +278,6 @@ func TestDeltaFIFOW_ReplaceMakesDeletionsForObjectsOnlyInQueue(t *testing.T) {
|
||||
},
|
||||
}
|
||||
for _, tt := range table {
|
||||
tt := tt
|
||||
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
// Test with a DeltaFIFO with a backing KnownObjects
|
||||
fWithKnownObjects := NewDeltaFIFOWithOptions(DeltaFIFOOptions{
|
||||
|
||||
4
tools/cache/the_real_fifo_test.go
vendored
4
tools/cache/the_real_fifo_test.go
vendored
@@ -246,8 +246,6 @@ func TestRealFIFOW_ReplaceMakesDeletionsForObjectsOnlyInQueue(t *testing.T) {
|
||||
},
|
||||
}
|
||||
for _, tt := range table {
|
||||
tt := tt
|
||||
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
// Test with a RealFIFO with a backing KnownObjects
|
||||
fWithKnownObjects := NewRealFIFO(
|
||||
@@ -1394,8 +1392,6 @@ func TestRealFIFO_ReplaceAtomic(t *testing.T) {
|
||||
},
|
||||
}
|
||||
for _, tt := range table {
|
||||
tt := tt
|
||||
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
// Test with a RealFIFO with a backing KnownObjects
|
||||
f := NewRealFIFO(
|
||||
|
||||
@@ -72,7 +72,6 @@ func TestSetDefaults_Config(t *testing.T) {
|
||||
},
|
||||
}
|
||||
for _, test := range tests {
|
||||
test := test
|
||||
t.Run(test.name, func(t *testing.T) {
|
||||
gotOut := test.in.DeepCopy()
|
||||
SetDefaults_ExecConfig(gotOut)
|
||||
|
||||
@@ -548,7 +548,6 @@ func TestRetryWatcher(t *testing.T) {
|
||||
}
|
||||
|
||||
for _, tc := range tt {
|
||||
tc := tc
|
||||
t.Run(tc.name, func(t *testing.T) {
|
||||
_, ctx := ktesting.NewTestContext(t)
|
||||
t.Parallel()
|
||||
|
||||
Reference in New Issue
Block a user