Skip to content

Commit 581e449

Browse files
committed
fix lint issues
1 parent 410efc9 commit 581e449

File tree

5 files changed

+7
-15
lines changed

5 files changed

+7
-15
lines changed

.github/workflows/pr-golangci-lint.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
- name: golangci-lint
3131
uses: golangci/golangci-lint-action@4696ba8babb6127d732c3c6dde519db15edab9ea # tag=v6.5.1
3232
with:
33-
version: v1.64.2
33+
version: v1.64.3
3434
args: --out-format=colored-line-number
3535
working-directory: ${{matrix.working-directory}}
3636
- name: Lint API

Tiltfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ tilt_helper_dockerfile_header = """
174174
# Tilt image
175175
FROM golang:1.24.9 as tilt-helper
176176
# Install delve. Note this should be kept in step with the Go release minor version.
177-
RUN go install github.com/go-delve/delve/cmd/dlv@v1.23
177+
RUN go install github.com/go-delve/delve/cmd/dlv@v1.24
178178
# Support live reloading with Tilt
179179
RUN wget --output-document /restart.sh --quiet https://raw.githubusercontent.com/tilt-dev/rerun-process-wrapper/master/restart.sh && \
180180
wget --output-document /start.sh --quiet https://raw.githubusercontent.com/tilt-dev/rerun-process-wrapper/master/start.sh && \

hack/tools/.custom-gcl.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
version: v1.63.4
2-
name: golangci-lint-kal-v1.63.4
1+
version: v1.63.3
2+
name: golangci-lint-kal-v1.63.3
33
destination: ./bin
44
plugins:
55
- module: 'github.com/JoelSpeed/kal'

internal/controllers/clusterresourceset/clusterresourceset_helpers.go

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -146,11 +146,7 @@ func (r *Reconciler) getOrCreateClusterResourceSetBinding(ctx context.Context, c
146146
// getConfigMap retrieves any ConfigMap from the given name and namespace.
147147
func getConfigMap(ctx context.Context, c client.Client, configmapName types.NamespacedName) (*corev1.ConfigMap, error) {
148148
configMap := &corev1.ConfigMap{}
149-
configMapKey := client.ObjectKey{
150-
Namespace: configmapName.Namespace,
151-
Name: configmapName.Name,
152-
}
153-
if err := c.Get(ctx, configMapKey, configMap); err != nil {
149+
if err := c.Get(ctx, configmapName, configMap); err != nil {
154150
return nil, err
155151
}
156152

@@ -160,11 +156,7 @@ func getConfigMap(ctx context.Context, c client.Client, configmapName types.Name
160156
// getSecret retrieves any Secret from the given secret name and namespace.
161157
func getSecret(ctx context.Context, c client.Client, secretName types.NamespacedName) (*corev1.Secret, error) {
162158
secret := &corev1.Secret{}
163-
secretKey := client.ObjectKey{
164-
Namespace: secretName.Namespace,
165-
Name: secretName.Name,
166-
}
167-
if err := c.Get(ctx, secretKey, secret); err != nil {
159+
if err := c.Get(ctx, secretName, secret); err != nil {
168160
return nil, err
169161
}
170162

test/e2e/cluster_upgrade_runtimesdk.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -687,7 +687,7 @@ func beforeClusterDeleteHandler(ctx context.Context, c client.Client, cluster ty
687687
var blocked = true
688688

689689
// If the Cluster is not found it has been deleted and the hook is unblocked.
690-
if apierrors.IsNotFound(c.Get(ctx, client.ObjectKey{Name: cluster.Name, Namespace: cluster.Namespace}, &clusterv1.Cluster{})) {
690+
if apierrors.IsNotFound(c.Get(ctx, cluster, &clusterv1.Cluster{})) {
691691
blocked = false
692692
}
693693
return blocked

0 commit comments

Comments
 (0)