mirror of
https://github.com/NVIDIA/nvidia-container-toolkit
synced 2025-06-26 18:18:24 +00:00
[no-relnotes] Update moq to use rm and goimports
Signed-off-by: Evan Lezar <elezar@nvidia.com>
This commit is contained in:
@@ -167,7 +167,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 -fmt=goimports -out mock/%s.go -pkg mock . %s:%s",
|
||||
}
|
||||
|
||||
var signature strings.Builder
|
||||
|
||||
@@ -35,7 +35,7 @@ var errLibraryAlreadyLoaded = errors.New("library already loaded")
|
||||
// dynamicLibrary is an interface for abstacting the underlying library.
|
||||
// This also allows for mocking and testing.
|
||||
|
||||
//go:generate moq -rm -stub -out dynamicLibrary_mock.go . dynamicLibrary
|
||||
//go:generate moq -rm -fmt=goimports -stub -out dynamicLibrary_mock.go . dynamicLibrary
|
||||
type dynamicLibrary interface {
|
||||
Lookup(string) error
|
||||
Open() error
|
||||
|
||||
@@ -4,8 +4,9 @@
|
||||
package mock
|
||||
|
||||
import (
|
||||
"github.com/NVIDIA/nvidia-container-toolkit/internal/nvsandboxutils"
|
||||
"sync"
|
||||
|
||||
"github.com/NVIDIA/nvidia-container-toolkit/internal/nvsandboxutils"
|
||||
)
|
||||
|
||||
// Ensure, that Interface does implement nvsandboxutils.Interface.
|
||||
|
||||
@@ -31,7 +31,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 -fmt=goimports -out mock/interface.go -pkg mock . Interface:Interface
|
||||
type Interface interface {
|
||||
ErrorString(Ret) string
|
||||
GetDriverVersion() (string, Ret)
|
||||
|
||||
Reference in New Issue
Block a user