Skip to content

Commit 956b8c4

Browse files
Apply suggestions from code review
fix comment format Co-authored-by: Chun-Hung Tseng <henrybear327@users.noreply.github.com>
1 parent 5f48a55 commit 956b8c4

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

internal/controller/ipaddress_controller_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ var _ = Describe("IpAddress Controller", Ordered, func() {
9292
}, timeout, interval).Should(BeTrue())
9393
} else {
9494

95-
// check that reconcile loop did run a least once by checking that conditions are set
95+
// check that reconcile loop did run at least once by checking that conditions are set
9696
Eventually(func() bool {
9797
err := k8sClient.Get(ctx, types.NamespacedName{Name: cr.GetName(), Namespace: cr.GetNamespace()}, createdCR)
9898
return err == nil && len(createdCR.Status.Conditions) > 0

pkg/netbox/api/ip_address.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ func (r *NetboxClient) ReserveOrUpdateIpAddress(ipAddress *models.IPAddress) (*n
6767
if ipAddress.Metadata != nil {
6868
if restorationHash, ok := ipAddress.Metadata.Custom[restorationHashKey]; ok {
6969
if ipToUpdate.CustomFields != nil && ipToUpdate.CustomFields.(map[string]interface{})[restorationHashKey] == restorationHash {
70-
//update ip address since it does exist and the restoration hash matches
70+
// update ip address since it does exist and the restoration hash matches
7171
return r.UpdateIpAddress(ipToUpdate.ID, desiredIPAddress)
7272
}
7373
return nil, fmt.Errorf("%w, assigned ip address %s", ErrRestorationHashMismatch, ipAddress.IpAddress)

pkg/netbox/api/ip_range.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ func (r *NetboxClient) ReserveOrUpdateIpRange(ipRange *models.IpRange) (*netboxM
7070
if ipRange.Metadata != nil {
7171
if restorationHash, ok := ipRange.Metadata.Custom[restorationHashKey]; ok {
7272
if ipRangeToUpdate.CustomFields != nil && ipRangeToUpdate.CustomFields.(map[string]interface{})[restorationHashKey] == restorationHash {
73-
//update ip address since it does exist and the restoration hash matches
73+
// update ip address since it does exist and the restoration hash matches
7474
return r.UpdateIpRange(ipRangeToUpdate.ID, desiredIpRange)
7575
}
7676
return nil, fmt.Errorf("%w, assigned ip range %s-%s", ErrRestorationHashMismatch, ipRange.StartAddress, ipRange.EndAddress)

0 commit comments

Comments
 (0)