Skip to content

Commit

Permalink
Remove the linter cheks failure
Browse files Browse the repository at this point in the history
  • Loading branch information
root authored and root committed Nov 14, 2024
1 parent 803993f commit 143c850
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
5 changes: 1 addition & 4 deletions gonvme_mock.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ var GONVMEMock struct {
InducedNVMeDeviceDataError bool
}

// MockNVMe provides a mock implementation of an NVMe client
type MockNVMe struct {
NVMeType
}
Expand All @@ -64,8 +63,7 @@ type MockCommandRunner struct {
Err error
}

func (m *MockCommandRunner) RunCommand(name string, args ...string) (string, error) {
// Return pre-defined output or error for testing
func (m *MockCommandRunner) RunCommand() (string, error) {
return m.Output, m.Err
}

Expand All @@ -76,7 +74,6 @@ func RunCommandWithRunner(runner CommandRunner, command []string) (string, error
return runner.RunCommand(command[0], command[1:]...)
}

// NewMockNVMe - returns a mock NVMe client
func NewMockNVMe(opts map[string]string) *MockNVMe {
nvme := MockNVMe{
NVMeType: NVMeType{
Expand Down
2 changes: 1 addition & 1 deletion gonvme_tcp_fc.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ func NewNVMe(opts map[string]string) *NVMe {
command = []string{"which", DefaultNVMeCommand}
}
log.Infof("NVMe %s",command)
path, err := exec.Command(command[0], command[1:]...).Output()
path, err := exec.Command(command[0], command[1:]...).Output() // #nosec G204
if err != nil {
log.Fatalf("Failed to find nvme command: %v", err)
}
Expand Down

0 comments on commit 143c850

Please sign in to comment.