Skip to content

Commit

Permalink
chore(deps): use valid formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Nox-404 committed Feb 5, 2024
1 parent ea71529 commit de5de62
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions scaleway/loadbalancers.go
Original file line number Diff line number Diff line change
Expand Up @@ -1853,7 +1853,7 @@ func frontendEquals(got, want *scwlb.Frontend) bool {
return false
}
if got.InboundPort != want.InboundPort {
klog.V(3).Infof("frontend.InboundPort: %s - %s", got.InboundPort, want.InboundPort)
klog.V(3).Infof("frontend.InboundPort: %d - %d", got.InboundPort, want.InboundPort)
return false
}
if !durationPtrEqual(got.TimeoutClient, want.TimeoutClient) {
Expand All @@ -1879,7 +1879,7 @@ func backendEquals(got, want *scwlb.Backend) bool {
return false
}
if got.ForwardPort != want.ForwardPort {
klog.V(3).Infof("backend.ForwardPort: %s - %s", got.ForwardPort, want.ForwardPort)
klog.V(3).Infof("backend.ForwardPort: %d - %d", got.ForwardPort, want.ForwardPort)
return false
}
if got.ForwardProtocol != want.ForwardProtocol {
Expand Down Expand Up @@ -1915,11 +1915,11 @@ func backendEquals(got, want *scwlb.Backend) bool {
return false
}
if !int32PtrEqual(got.RedispatchAttemptCount, want.RedispatchAttemptCount) {
klog.V(3).Infof("backend.RedispatchAttemptCount: %s - %s", got.RedispatchAttemptCount, want.RedispatchAttemptCount)
klog.V(3).Infof("backend.RedispatchAttemptCount: %s - %s", ptrInt32ToString(got.RedispatchAttemptCount), ptrInt32ToString(want.RedispatchAttemptCount))
return false
}
if !int32PtrEqual(got.MaxRetries, want.MaxRetries) {
klog.V(3).Infof("backend.MaxRetries: %s - %s", got.MaxRetries, want.MaxRetries)
klog.V(3).Infof("backend.MaxRetries: %s - %s", ptrInt32ToString(got.MaxRetries), ptrInt32ToString(want.MaxRetries))
return false
}
if got.StickySessionsCookieName != want.StickySessionsCookieName {
Expand All @@ -1928,7 +1928,7 @@ func backendEquals(got, want *scwlb.Backend) bool {
}

if !reflect.DeepEqual(got.HealthCheck, want.HealthCheck) {
klog.V(3).Infof("backend.HealthCheck: %s - %s", got.HealthCheck, want.HealthCheck)
klog.V(3).Infof("backend.HealthCheck: %v - %v", got.HealthCheck, want.HealthCheck)
return false
}

Expand Down Expand Up @@ -2276,3 +2276,10 @@ func makeACLSpecs(service *v1.Service, nodes []*v1.Node, frontend *scwlb.Fronten

return acls
}

func ptrInt32ToString(i *int32) string {
if i == nil {
return "<nil>"
}
return fmt.Sprintf("%d", *i)
}

0 comments on commit de5de62

Please sign in to comment.