diff --git a/cloudmock/scaleway/mockdns/api.go b/cloudmock/scaleway/mockdns/api.go index 806be1144e..46d7b197b5 100644 --- a/cloudmock/scaleway/mockdns/api.go +++ b/cloudmock/scaleway/mockdns/api.go @@ -107,7 +107,7 @@ func (f *FakeDomainAPI) UpdateDNSZoneRecords(req *domain.UpdateDNSZoneRecordsReq break } } - if found == false { + if !found { return nil, fmt.Errorf("could not find record %s to delete", *change.Delete.ID) } diff --git a/pkg/model/context.go b/pkg/model/context.go index 0dd47fdbe4..90990d183a 100644 --- a/pkg/model/context.go +++ b/pkg/model/context.go @@ -265,7 +265,7 @@ func (b *KopsModelContext) CloudTags(name string, shared bool) map[string]string } case kops.CloudProviderScaleway: for k, v := range b.Cluster.Spec.CloudLabels { - if k == scaleway.TagClusterName && shared == true { + if k == scaleway.TagClusterName && shared { klog.V(4).Infof("Skipping %q tag for shared resource", scaleway.TagClusterName) continue } diff --git a/upup/pkg/fi/cloudup/scalewaytasks/instance.go b/upup/pkg/fi/cloudup/scalewaytasks/instance.go index 70bff56ca8..a5d9c2695b 100644 --- a/upup/pkg/fi/cloudup/scalewaytasks/instance.go +++ b/upup/pkg/fi/cloudup/scalewaytasks/instance.go @@ -92,7 +92,7 @@ func (s *Instance) Find(c *fi.CloudupContext) (*Instance, error) { alreadyTagged = true } } - if alreadyTagged == true { + if alreadyTagged { continue } @@ -107,7 +107,7 @@ func (s *Instance) Find(c *fi.CloudupContext) (*Instance, error) { if err != nil { return nil, fmt.Errorf("checking image differences in server %s (%s): %w", server.Name, server.ID, err) } - if diff == true { + if diff { needsUpdate = append(needsUpdate, server.ID) continue } @@ -117,7 +117,7 @@ func (s *Instance) Find(c *fi.CloudupContext) (*Instance, error) { if err != nil { return nil, fmt.Errorf("checking user-data differences in server %s (%s): %w", server.Name, server.ID, err) } - if diff == true { + if diff { needsUpdate = append(needsUpdate, server.ID) } } @@ -457,7 +457,7 @@ func findFirstFreeIndex(existing []*instance.Server) int { break } } - if found == false { + if !found { return index } }