Skip to content

Commit

Permalink
linter
Browse files Browse the repository at this point in the history
  • Loading branch information
v-kamerdinerov committed Sep 4, 2024
1 parent fcea543 commit 89bde64
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,12 @@ type Scanner struct {
}

type ScanResult struct {
IP string `json:"ip"`
Port string `json:"port"`
Ping int64 `json:"ping"`
TLSVersion string `json:"tls_version"`
ALPN string `json:"alpn"`
CommonName string `json:"common_name"`
IP string `json:"ip"`
Port string `json:"port"`
Ping int64 `json:"ping"`
TLSVersion string `json:"tls_version"`
ALPN string `json:"alpn"`
CommonName string `json:"common_name"`
}

func (f *CustomTextFormatter) Format(entry *logrus.Entry) ([]byte, error) {
Expand Down Expand Up @@ -279,7 +279,10 @@ func (s *Scanner) Scan(ip net.IP) {
remoteIP := remoteAddr.IP.String()
port := remoteAddr.Port
line := fmt.Sprintf("%s:%d", remoteIP, port) + "\t"
conn.SetDeadline(time.Now().Add(s.timeout))
if err := conn.SetDeadline(time.Now().Add(s.timeout)); err != nil {
log.WithError(err).Error("Error setting deadline")
return
}
c := tls.Client(conn, &tls.Config{
InsecureSkipVerify: true,
NextProtos: []string{"h2", "http/1.1"},
Expand Down

0 comments on commit 89bde64

Please sign in to comment.