Skip to content

Commit 447cb8d

Browse files
thomas-senechalpeterjah
authored andcommitted
Fix lint errors in plugin_unix.go
1 parent 331be92 commit 447cb8d

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

pkg/plugin/plugin_unix.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,26 @@
33
package plugin
44

55
import (
6+
"fmt"
67
"os/exec"
78
"syscall"
89

910
"github.com/massalabs/station/pkg/logger"
1011
)
1112

12-
// sendStopSignal sends an appropriate signal to gracefully stop a process on Unix systems
13+
// sendStopSignal sends an appropriate signal to gracefully stop a process on Unix systems.
1314
func (p *Plugin) sendStopSignal() error {
1415
err := p.command.Process.Signal(syscall.SIGTERM)
1516
if err != nil {
16-
logger.Warnf("Failed to send SIGTERM to plugin %s: %s\n", p.ID, err)
17-
return err
17+
return fmt.Errorf("failed to send SIGTERM to plugin %s: %w", p.ID, err)
1818
}
1919

2020
logger.Infof("Sent SIGTERM to plugin %s.\n", p.ID)
21+
2122
return nil
2223
}
2324

24-
// setupProcess configures platform-specific process attributes (no-op on Unix)
25-
func setupProcess(cmd *exec.Cmd) {
25+
// setupProcess configures platform-specific process attributes (no-op on Unix).
26+
func setupProcess(_ *exec.Cmd) {
2627
// No special setup needed for Unix systems
2728
}

0 commit comments

Comments
 (0)