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

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/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@ jobs:
- name: golangci-lint
uses: golangci/golangci-lint-action@971e284b6050e8a5849b72094c50ab08da042db8 # tag=v6.1.1
with:
version: v1.61.0
version: v1.63.4
args: --out-format=colored-line-number
working-directory: ${{matrix.working-directory}}
1 change: 1 addition & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ issues:
- unused
# Seems to incorrectly trigger on the two implementations that are only
# used through an interface and not directly..?
# Likely same issue as https://github.com/dominikh/go-tools/issues/1616
path: pkg/controller/priorityqueue/metrics\.go

run:
Expand Down
10 changes: 5 additions & 5 deletions pkg/client/fake/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -1050,32 +1050,32 @@ func dryPatch(action testing.PatchActionImpl, tracker testing.ObjectTracker) (ru
}

// copyStatusFrom copies the status from old into new
func copyStatusFrom(old, new runtime.Object) error {
func copyStatusFrom(old, n runtime.Object) error {
oldMapStringAny, err := toMapStringAny(old)
if err != nil {
return fmt.Errorf("failed to convert old to *unstructured.Unstructured: %w", err)
}
newMapStringAny, err := toMapStringAny(new)
newMapStringAny, err := toMapStringAny(n)
if err != nil {
return fmt.Errorf("failed to convert new to *unststructured.Unstructured: %w", err)
}

newMapStringAny["status"] = oldMapStringAny["status"]

if err := fromMapStringAny(newMapStringAny, new); err != nil {
if err := fromMapStringAny(newMapStringAny, n); err != nil {
return fmt.Errorf("failed to convert back from map[string]any: %w", err)
}

return nil
}

// copyFrom copies from old into new
func copyFrom(old, new runtime.Object) error {
func copyFrom(old, n runtime.Object) error {
oldMapStringAny, err := toMapStringAny(old)
if err != nil {
return fmt.Errorf("failed to convert old to *unstructured.Unstructured: %w", err)
}
if err := fromMapStringAny(oldMapStringAny, new); err != nil {
if err := fromMapStringAny(oldMapStringAny, n); err != nil {
return fmt.Errorf("failed to convert back from map[string]any: %w", err)
}

Expand Down
Loading