Skip to content

Commit fb3825e

Browse files
Fix linting errors in serverlist.go
Remove empty conditional branches that triggered staticcheck SA9003. Remove unused imports (errors, os).
1 parent 4197693 commit fb3825e

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

pkg/sqlcmd/serverlist.go

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,9 @@ package sqlcmd
55

66
import (
77
"context"
8-
"errors"
98
"fmt"
109
"io"
1110
"net"
12-
"os"
1311
"strings"
1412
"time"
1513

@@ -43,16 +41,12 @@ func GetLocalServerInstances() []string {
4341
_ = conn.SetDeadline(dl)
4442
_, err = conn.Write(bmsg)
4543
if err != nil {
46-
if !errors.Is(err, os.ErrDeadlineExceeded) {
47-
// Silently ignore errors, same as ODBC
48-
}
44+
// Silently ignore errors, same as ODBC
4945
return nil
5046
}
5147
read, err := conn.Read(resp)
5248
if err != nil {
53-
if !errors.Is(err, os.ErrDeadlineExceeded) {
54-
// Silently ignore errors, same as ODBC
55-
}
49+
// Silently ignore errors, same as ODBC
5650
return nil
5751
}
5852

0 commit comments

Comments
 (0)