diff --git a/hack/tools/Makefile b/hack/tools/Makefile index 54b9c50b34..6e0ff82897 100644 --- a/hack/tools/Makefile +++ b/hack/tools/Makefile @@ -15,7 +15,7 @@ ROOT_DIR_RELATIVE := ../.. include $(ROOT_DIR_RELATIVE)/common.mk -GOLANGCI_LINT_VERSION ?= v2.4.0 +GOLANGCI_LINT_VERSION ?= v2.5.0 # GOTESTSUM version without the leading 'v' GOTESTSUM_VERSION ?= 1.12.0 diff --git a/pkg/cloud/services/compute/instance.go b/pkg/cloud/services/compute/instance.go index cf62602356..255faf6d5c 100644 --- a/pkg/cloud/services/compute/instance.go +++ b/pkg/cloud/services/compute/instance.go @@ -241,14 +241,14 @@ func (s *Service) getOrCreateVolumeBuilder(eventObject runtime.Object, instanceS func resolveVolumeOpts(instanceSpec *InstanceSpec, volumeOpts *infrav1.BlockDeviceVolume) (az, volType string) { if volumeOpts == nil { - return + return az, volType } volType = volumeOpts.Type volumeAZ := volumeOpts.AvailabilityZone if volumeAZ == nil { - return + return az, volType } switch volumeAZ.From { @@ -260,7 +260,7 @@ func resolveVolumeOpts(instanceSpec *InstanceSpec, volumeOpts *infrav1.BlockDevi case infrav1.VolumeAZFromMachine: az = instanceSpec.FailureDomain } - return + return az, volType } // getBlockDevices returns a list of block devices that were created and attached to the instance. It returns an error diff --git a/pkg/utils/filterconvert/convert.go b/pkg/utils/filterconvert/convert.go index d71a1d25bb..25346b7d3f 100644 --- a/pkg/utils/filterconvert/convert.go +++ b/pkg/utils/filterconvert/convert.go @@ -93,7 +93,7 @@ func RouterFilterToListOpts(routerFilter *infrav1.RouterFilter) routers.ListOpts func ImageFilterToListOpts(imageFilter *infrav1.ImageFilter) (listOpts images.ListOpts) { if imageFilter == nil { - return + return listOpts } if imageFilter.Name != nil && *imageFilter.Name != "" { @@ -103,5 +103,5 @@ func ImageFilterToListOpts(imageFilter *infrav1.ImageFilter) (listOpts images.Li if len(imageFilter.Tags) > 0 { listOpts.Tags = imageFilter.Tags } - return + return listOpts }