From 511a6bac3a15245ff84a95ced3f03d434557da54 Mon Sep 17 00:00:00 2001 From: Evan Lezar Date: Wed, 19 Jun 2024 16:37:38 +0200 Subject: [PATCH] Include -rm in generated moq command Signed-off-by: Evan Lezar --- gen/nvml/generateapi.go | 2 +- pkg/nvml/zz_generated.api.go | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/gen/nvml/generateapi.go b/gen/nvml/generateapi.go index 5ec4a07..16183bc 100644 --- a/gen/nvml/generateapi.go +++ b/gen/nvml/generateapi.go @@ -198,7 +198,7 @@ func generateInterfaceComment(input GeneratableInterfacePoperties) (string, erro commentFmt := []string{ "// %s represents the interface for the %s type.", "//", - "//go:generate moq -out mock/%s.go -pkg mock . %s:%s", + "//go:generate moq -rm -out mock/%s.go -pkg mock . %s:%s", } var signature strings.Builder diff --git a/pkg/nvml/zz_generated.api.go b/pkg/nvml/zz_generated.api.go index c1ecb2d..32f28e1 100644 --- a/pkg/nvml/zz_generated.api.go +++ b/pkg/nvml/zz_generated.api.go @@ -345,7 +345,7 @@ var ( // Interface represents the interface for the library type. // -//go:generate moq -out mock/interface.go -pkg mock . Interface:Interface +//go:generate moq -rm -out mock/interface.go -pkg mock . Interface:Interface type Interface interface { ComputeInstanceDestroy(ComputeInstance) Return ComputeInstanceGetInfo(ComputeInstance) (ComputeInstanceInfo, Return) @@ -672,7 +672,7 @@ type Interface interface { // Device represents the interface for the nvmlDevice type. // -//go:generate moq -out mock/device.go -pkg mock . Device:Device +//go:generate moq -rm -out mock/device.go -pkg mock . Device:Device type Device interface { ClearAccountingPids() Return ClearCpuAffinity() Return @@ -905,7 +905,7 @@ type Device interface { // GpuInstance represents the interface for the nvmlGpuInstance type. // -//go:generate moq -out mock/gpuinstance.go -pkg mock . GpuInstance:GpuInstance +//go:generate moq -rm -out mock/gpuinstance.go -pkg mock . GpuInstance:GpuInstance type GpuInstance interface { CreateComputeInstance(*ComputeInstanceProfileInfo) (ComputeInstance, Return) CreateComputeInstanceWithPlacement(*ComputeInstanceProfileInfo, *ComputeInstancePlacement) (ComputeInstance, Return) @@ -921,7 +921,7 @@ type GpuInstance interface { // ComputeInstance represents the interface for the nvmlComputeInstance type. // -//go:generate moq -out mock/computeinstance.go -pkg mock . ComputeInstance:ComputeInstance +//go:generate moq -rm -out mock/computeinstance.go -pkg mock . ComputeInstance:ComputeInstance type ComputeInstance interface { Destroy() Return GetInfo() (ComputeInstanceInfo, Return) @@ -929,7 +929,7 @@ type ComputeInstance interface { // EventSet represents the interface for the nvmlEventSet type. // -//go:generate moq -out mock/eventset.go -pkg mock . EventSet:EventSet +//go:generate moq -rm -out mock/eventset.go -pkg mock . EventSet:EventSet type EventSet interface { Free() Return Wait(uint32) (EventData, Return) @@ -937,7 +937,7 @@ type EventSet interface { // GpmSample represents the interface for the nvmlGpmSample type. // -//go:generate moq -out mock/gpmsample.go -pkg mock . GpmSample:GpmSample +//go:generate moq -rm -out mock/gpmsample.go -pkg mock . GpmSample:GpmSample type GpmSample interface { Free() Return Get(Device) Return @@ -946,7 +946,7 @@ type GpmSample interface { // Unit represents the interface for the nvmlUnit type. // -//go:generate moq -out mock/unit.go -pkg mock . Unit:Unit +//go:generate moq -rm -out mock/unit.go -pkg mock . Unit:Unit type Unit interface { GetDevices() ([]Device, Return) GetFanSpeedInfo() (UnitFanSpeeds, Return) @@ -959,7 +959,7 @@ type Unit interface { // VgpuInstance represents the interface for the nvmlVgpuInstance type. // -//go:generate moq -out mock/vgpuinstance.go -pkg mock . VgpuInstance:VgpuInstance +//go:generate moq -rm -out mock/vgpuinstance.go -pkg mock . VgpuInstance:VgpuInstance type VgpuInstance interface { ClearAccountingPids() Return GetAccountingMode() (EnableState, Return) @@ -988,7 +988,7 @@ type VgpuInstance interface { // VgpuTypeId represents the interface for the nvmlVgpuTypeId type. // -//go:generate moq -out mock/vgputypeid.go -pkg mock . VgpuTypeId:VgpuTypeId +//go:generate moq -rm -out mock/vgputypeid.go -pkg mock . VgpuTypeId:VgpuTypeId type VgpuTypeId interface { GetCapabilities(VgpuCapability) (bool, Return) GetClass() (string, Return)