fix: Address all errcheck and misspell linter errors
This commit is contained in:
@@ -163,7 +163,7 @@ func discoverDaemon(socketPath string) DaemonInfo {
|
||||
}
|
||||
return daemon
|
||||
}
|
||||
defer client.Close()
|
||||
defer func() { _ = client.Close() }()
|
||||
|
||||
// Get status
|
||||
status, err := client.Status()
|
||||
@@ -264,7 +264,7 @@ func StopDaemon(daemon DaemonInfo) error {
|
||||
// Try graceful shutdown via RPC first
|
||||
client, err := rpc.TryConnectWithTimeout(daemon.SocketPath, 500*time.Millisecond)
|
||||
if err == nil && client != nil {
|
||||
defer client.Close()
|
||||
defer func() { _ = client.Close() }()
|
||||
if err := client.Shutdown(); err == nil {
|
||||
// Wait a bit for daemon to shut down
|
||||
time.Sleep(200 * time.Millisecond)
|
||||
@@ -334,7 +334,7 @@ func stopDaemonWithTimeout(daemon DaemonInfo) error {
|
||||
// Try RPC shutdown first (2 second timeout)
|
||||
client, err := rpc.TryConnectWithTimeout(daemon.SocketPath, 2*time.Second)
|
||||
if err == nil && client != nil {
|
||||
defer client.Close()
|
||||
defer func() { _ = client.Close() }()
|
||||
if err := client.Shutdown(); err == nil {
|
||||
// Wait and verify process died
|
||||
time.Sleep(500 * time.Millisecond)
|
||||
|
||||
Reference in New Issue
Block a user