Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
howardjohn committed Nov 5, 2024
1 parent 93bda6a commit 88c4623
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 18 deletions.
15 changes: 0 additions & 15 deletions pkg/kube/krt/collection.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,27 +187,12 @@ func (h *manyCollection[I, O]) dump() CollectionDump {
cur.Dependencies = depss
inputs[string(k)] = cur
}
// var xx Key[I]
// x := h.objectDependencies[xx][0].

return CollectionDump{
Outputs: eraseMap(h.collectionState.outputs),
Inputs: inputs,
InputCollection: h.parent.(internalCollection[I]).name(),
}
//h.log.Errorf(">>> BEGIN DUMP")
//for k, deps := range h.objectDependencies {
// for _, dep := range deps {
// h.log.Errorf("Dependencies for: %v: %v (%v)", k, dep.collectionName, dep.filter)
// }
//}
//for i, os := range h.collectionState.mappings {
// h.log.Errorf("Input %v -> %v", i, os.UnsortedList())
//}
//for os, o := range h.collectionState.outputs {
// h.log.Errorf("Output %v -> %v", os, o)
//}
//h.log.Errorf("<<< END DUMP")
}

// nolint: unused // (not true, its to implement an interface)
Expand Down
1 change: 1 addition & 0 deletions pkg/kube/krt/debug.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ func maybeRegisterCollectionForDebugging[T any](c Collection[T], handler *DebugH
})
}

// nolint: unused // (not true, not sure why it thinks it is!)
func eraseMap[T any](l map[Key[T]]T) map[string]any {
nm := make(map[string]any, len(l))
for k, v := range l {
Expand Down
4 changes: 1 addition & 3 deletions pkg/kube/krt/informer.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,7 @@ func (i *informer[I]) Synced() Syncer {
// nolint: unused // (not true, its to implement an interface)
func (i *informer[I]) dump() CollectionDump {
return CollectionDump{
Outputs: eraseMap(slices.GroupUnique(i.inf.List(metav1.NamespaceAll, klabels.Everything()), func(t I) Key[I] {
return GetKey(t)
})),
Outputs: eraseMap(slices.GroupUnique(i.inf.List(metav1.NamespaceAll, klabels.Everything()), GetKey)),
}
}

Expand Down

0 comments on commit 88c4623

Please sign in to comment.