diff --git a/cmd/metal-api/internal/grpc/boot-service_test.go b/cmd/metal-api/internal/grpc/boot-service_test.go index 6d181ec8..b0132ca8 100644 --- a/cmd/metal-api/internal/grpc/boot-service_test.go +++ b/cmd/metal-api/internal/grpc/boot-service_test.go @@ -130,8 +130,8 @@ func TestBootService_Register(t *testing.T) { Cpus: []*v1.MachineCPU{ { Model: "Intel Xeon Silver", - Cores: uint32(tt.numcores), - Threads: uint32(tt.numcores), + Cores: uint32(tt.numcores), // nolint:gosec + Threads: uint32(tt.numcores), // nolint:gosec }, }, Nics: []*v1.MachineNic{ diff --git a/cmd/metal-api/internal/service/asn.go b/cmd/metal-api/internal/service/asn.go index 6d0dea1f..50969089 100644 --- a/cmd/metal-api/internal/service/asn.go +++ b/cmd/metal-api/internal/service/asn.go @@ -25,7 +25,7 @@ func acquireASN(ds *datastore.RethinkStore) (*uint32, error) { if err != nil { return nil, err } - asn := ASNBase + uint32(i) + asn := ASNBase + uint32(i) // nolint:gosec if asn > ASNMax { return nil, fmt.Errorf("unable to calculate asn, got a asn larger than ASNMax: %d > %d", asn, ASNMax) } diff --git a/cmd/metal-api/internal/service/partition-service.go b/cmd/metal-api/internal/service/partition-service.go index efc55ac9..012097ce 100644 --- a/cmd/metal-api/internal/service/partition-service.go +++ b/cmd/metal-api/internal/service/partition-service.go @@ -170,7 +170,6 @@ func (r *partitionResource) createPartition(request *restful.Request, response * if requestPayload.Labels != nil { labels = requestPayload.Labels } - var imageURL string if requestPayload.PartitionBootConfiguration.ImageURL != nil { imageURL = *requestPayload.PartitionBootConfiguration.ImageURL diff --git a/cmd/metal-api/internal/service/project-service.go b/cmd/metal-api/internal/service/project-service.go index 4b5ef450..db773159 100644 --- a/cmd/metal-api/internal/service/project-service.go +++ b/cmd/metal-api/internal/service/project-service.go @@ -348,8 +348,8 @@ func (r *projectResource) setProjectQuota(project *mdmv1.Project) (*v1.Project, if qs.Ip == nil { qs.Ip = &v1.Quota{} } - machineUsage := int32(len(ms)) - ipUsage := int32(len(ips)) + machineUsage := int32(len(ms)) // nolint:gosec + ipUsage := int32(len(ips)) // nolint:gosec qs.Machine.Used = &machineUsage qs.Ip.Used = &ipUsage