Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ jobs:
- name: golangci-lint
uses: golangci/golangci-lint-action@v9
with:
version: v2.11
version: v2.12
12 changes: 0 additions & 12 deletions .github/workflows/reuse.yml

This file was deleted.

1 change: 0 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ linters:
- dupl
- errcheck
- ginkgolinter
- goconst
- gocyclo
- govet
- ineffassign
Expand Down
11 changes: 6 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ GOLANGCI_LINT ?= $(LOCALBIN)/golangci-lint
ADDLICENSE_VERSION ?= v1.1.1
GOIMPORTS_VERSION ?= v0.41.0
MOCKGEN_VERSION ?= v0.6.0
GOLANGCI_LINT_VERSION ?= v2.11
GOLANGCI_LINT_VERSION ?= v2.12

.PHONY: addlicense
addlicense: $(ADDLICENSE) ## Download addlicense locally if necessary.
Expand All @@ -98,6 +98,7 @@ $(GOLANGCI_LINT): $(LOCALBIN)
$(call go-install-tool,$(GOLANGCI_LINT),github.com/golangci/golangci-lint/v2/cmd/golangci-lint,${GOLANGCI_LINT_VERSION})

# go-install-tool will 'go install' any package with custom target and name of binary, if it doesn't exist
# Note: All paths are quoted to work in directories containing spaces or parentheses.
# $1 - target path with name of binary
# $2 - package url which can be installed
# $3 - specific version of package
Expand All @@ -106,9 +107,9 @@ define go-install-tool
set -e; \
package=$(2)@$(3) ;\
echo "Downloading $${package}" ;\
rm -f $(1) || true ;\
GOBIN=$(LOCALBIN) go install $${package} ;\
mv $(1) $(1)-$(3) ;\
rm -f "$(1)" || true ;\
GOBIN="$(LOCALBIN)" go install "$${package}" ;\
mv "$(1)" "$(1)-$(3)" ;\
} ;\
ln -sf $(1)-$(3) $(1)
ln -sf "$(1)-$(3)" "$(1)"
endef
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,4 @@ Copyright 2025 SAP SE or an SAP affiliate company and IronCore contributors. Ple
copyright and license information. Detailed information including third-party components and their licensing/copyright
information is available [via the REUSE tool](https://api.reuse.software/info/github.com/ironcore-dev/controller-utils).

<p align="center"><img alt="Bundesministerium für Wirtschaft und Energie (BMWE)-EU funding logo" src="https://apeirora.eu/assets/img/BMWK-EU.png" width="400"/></p>
2 changes: 1 addition & 1 deletion clientutils/clientutils.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ func (s *GetRequestSet) typedKey(req GetRequest) getRequestTypedKey {
// Taken from runtime.Scheme.AddKnownTypes.
// In this case it's fine to panic as we distinguish between typed and unstructured
// objects beforehand.
if t.Kind() != reflect.Ptr {
if t.Kind() != reflect.Pointer {
panic("All types must be pointers to structs")
}
t = t.Elem()
Expand Down
8 changes: 4 additions & 4 deletions conditionutils/conditionutils.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func enforceStruct(cond interface{}) (reflect.Value, error) {

func enforcePtrToStruct(cond interface{}) (reflect.Value, error) {
v := reflect.ValueOf(cond)
if v.Kind() != reflect.Ptr {
if v.Kind() != reflect.Pointer {
return reflect.Value{}, fmt.Errorf("type %T is not a pointer to a struct", cond)
}
v = v.Elem()
Expand All @@ -69,7 +69,7 @@ func enforceStructSlice(condSlice interface{}) (sliceV reflect.Value, structType

func enforcePtrToStructSlice(condSlicePtr interface{}) (sliceV reflect.Value, structType reflect.Type, err error) {
v := reflect.ValueOf(condSlicePtr)
if v.Kind() != reflect.Ptr {
if v.Kind() != reflect.Pointer {
return reflect.Value{}, nil, fmt.Errorf("type %T is not a pointer to a slice of structs", condSlicePtr)
}

Expand Down Expand Up @@ -99,7 +99,7 @@ func getAndConvertField(v reflect.Value, name string, into interface{}) error {
}

fType := f.Type()
if fType.Kind() == reflect.Ptr {
if fType.Kind() == reflect.Pointer {
fType = fType.Elem()
}

Expand Down Expand Up @@ -133,7 +133,7 @@ func setFieldConverted(v reflect.Value, name string, newValue interface{}) error

fType := f.Type()
var isPtr bool
if fType.Kind() == reflect.Ptr {
if fType.Kind() == reflect.Pointer {
isPtr = true
fType = fType.Elem()
}
Expand Down
47 changes: 23 additions & 24 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
module github.com/ironcore-dev/controller-utils

go 1.25.0
go 1.26.0

require (
github.com/onsi/ginkgo/v2 v2.32.0
github.com/onsi/gomega v1.42.1
github.com/spf13/pflag v1.0.10
github.com/stretchr/testify v1.11.1
go.uber.org/mock v0.6.0
k8s.io/api v0.35.3
k8s.io/apiextensions-apiserver v0.35.3
k8s.io/apimachinery v0.35.3
k8s.io/apiserver v0.35.3
k8s.io/client-go v0.35.3
k8s.io/utils v0.0.0-20251002143259-bc988d571ff4
sigs.k8s.io/controller-runtime v0.23.3
sigs.k8s.io/kustomize/api v0.20.1
sigs.k8s.io/kustomize/kyaml v0.20.1
k8s.io/api v0.36.3
k8s.io/apiextensions-apiserver v0.36.3
k8s.io/apimachinery v0.36.3
k8s.io/apiserver v0.36.3
k8s.io/client-go v0.36.3
k8s.io/utils v0.0.0-20260210185600-b8788abfbbc2
sigs.k8s.io/controller-runtime v0.24.1
sigs.k8s.io/kustomize/api v0.21.1
sigs.k8s.io/kustomize/kyaml v0.21.1
sigs.k8s.io/yaml v1.6.0
)

Expand Down Expand Up @@ -50,12 +50,11 @@ require (
github.com/go-openapi/swag/typeutils v0.25.1 // indirect
github.com/go-openapi/swag/yamlutils v0.25.1 // indirect
github.com/go-task/slim-sprig/v3 v3.0.0 // indirect
github.com/google/btree v1.1.3 // indirect
github.com/google/gnostic-models v0.7.0 // indirect
github.com/google/go-cmp v0.7.0 // indirect
github.com/google/pprof v0.0.0-20260402051712-545e8a4df936 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.3 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.7 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee // indirect
Expand All @@ -64,20 +63,20 @@ require (
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/prometheus/client_golang v1.23.2 // indirect
github.com/prometheus/client_model v0.6.2 // indirect
github.com/prometheus/common v0.67.1 // indirect
github.com/prometheus/procfs v0.19.1 // indirect
github.com/prometheus/common v0.67.5 // indirect
github.com/prometheus/procfs v0.19.2 // indirect
github.com/stretchr/objx v0.5.2 // indirect
github.com/x448/float16 v0.8.4 // indirect
github.com/xlab/treeprint v1.2.0 // indirect
go.opentelemetry.io/auto/sdk v1.2.1 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.63.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.65.0 // indirect
go.opentelemetry.io/otel v1.43.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.38.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.38.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.40.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.40.0 // indirect
go.opentelemetry.io/otel/metric v1.43.0 // indirect
go.opentelemetry.io/otel/sdk v1.43.0 // indirect
go.opentelemetry.io/otel/trace v1.43.0 // indirect
go.opentelemetry.io/proto/otlp v1.8.0 // indirect
go.opentelemetry.io/proto/otlp v1.9.0 // indirect
go.yaml.in/yaml/v2 v2.4.3 // indirect
go.yaml.in/yaml/v3 v3.0.4 // indirect
golang.org/x/mod v0.36.0 // indirect
Expand All @@ -93,15 +92,15 @@ require (
google.golang.org/genproto/googleapis/api v0.0.0-20260414002931-afd174a4e478 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20260414002931-afd174a4e478 // indirect
google.golang.org/grpc v1.82.1 // indirect
google.golang.org/protobuf v1.36.11 // indirect
google.golang.org/protobuf v1.36.12-0.20260120151049-f2248ac996af // indirect
gopkg.in/evanphx/json-patch.v4 v4.13.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/component-base v0.35.3 // indirect
k8s.io/klog/v2 v2.130.1 // indirect
k8s.io/kube-openapi v0.0.0-20250910181357-589584f1c912 // indirect
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.33.0 // indirect
k8s.io/component-base v0.36.3 // indirect
k8s.io/klog/v2 v2.140.0 // indirect
k8s.io/kube-openapi v0.0.0-20260317180543-43fb72c5454a // indirect
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.34.0 // indirect
sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 // indirect
sigs.k8s.io/randfill v1.0.0 // indirect
sigs.k8s.io/structured-merge-diff/v6 v6.3.2-0.20260122202528-d9cc6641c482 // indirect
sigs.k8s.io/structured-merge-diff/v6 v6.3.3 // indirect
)
Loading