Skip to content

Commit

Permalink
Include -rm in generated moq command
Browse files Browse the repository at this point in the history
Signed-off-by: Evan Lezar <[email protected]>
  • Loading branch information
elezar committed Jun 19, 2024
1 parent d7019cd commit 511a6ba
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion gen/nvml/generateapi.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
18 changes: 9 additions & 9 deletions pkg/nvml/zz_generated.api.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand All @@ -921,23 +921,23 @@ 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)
}

// 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)
}

// 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
Expand All @@ -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)
Expand All @@ -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)
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 511a6ba

Please sign in to comment.