Skip to content

Commit

Permalink
pr: print object type in store
Browse files Browse the repository at this point in the history
  • Loading branch information
rainest committed Oct 11, 2023
1 parent e65ebb4 commit 0e1ec60
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions internal/store/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ func (s Store) ListIngressesV1() []*netv1.Ingress {
for _, item := range s.stores.IngressV1.List() {
ing, ok := item.(*netv1.Ingress)
if !ok {
s.logger.Error(nil, "listIngressesV1: dropping object of unexpected type", "type", fmt.Sprintf("%#v", item))
s.logger.Error(nil, "listIngressesV1: dropping object of unexpected type", "type", fmt.Sprintf("%T", item))
continue
}
if ing.ObjectMeta.GetAnnotations()[annotations.IngressClassKey] != "" {
Expand Down Expand Up @@ -491,7 +491,7 @@ func (s Store) ListIngressClassesV1() []*netv1.IngressClass {
for _, item := range s.stores.IngressClassV1.List() {
class, ok := item.(*netv1.IngressClass)
if !ok {
s.logger.Error(nil, "listIngressClassesV1: dropping object of unexpected type", "type", fmt.Sprintf("%#v", item))
s.logger.Error(nil, "listIngressClassesV1: dropping object of unexpected type", "type", fmt.Sprintf("%T", item))
continue
}
if class.Spec.Controller != IngressClassKongController {
Expand All @@ -513,7 +513,7 @@ func (s Store) ListIngressClassParametersV1Alpha1() []*kongv1alpha1.IngressClass
for _, item := range s.stores.IngressClassParametersV1alpha1.List() {
classParam, ok := item.(*kongv1alpha1.IngressClassParameters)
if !ok {
s.logger.Error(nil, "listIngressClassParametersV1alpha1: dropping object of unexpected type", "type", fmt.Sprintf("%#v", item))
s.logger.Error(nil, "listIngressClassParametersV1alpha1: dropping object of unexpected type", "type", fmt.Sprintf("%T", item))
continue
}
classParams = append(classParams, classParam)
Expand Down

0 comments on commit 0e1ec60

Please sign in to comment.