Skip to content

Commit

Permalink
Merge branch 'FEAT/web-dashboard' of https://github.com/bisohns/saido
Browse files Browse the repository at this point in the history
…into FEAT/web-dashboard
  • Loading branch information
Nurudeen38 committed Nov 16, 2022
2 parents 4f59148 + 335ff99 commit 34c9587
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions inspector/tcp.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ package inspector
import (
"encoding/json"
"errors"
"fmt"
"strconv"
"strings"

Expand Down Expand Up @@ -64,7 +63,8 @@ func (i *TcpDarwin) Parse(output string) {
portString := address[len(address)-1]
port, err := strconv.Atoi(portString)
if err != nil {
log.Fatal("Could not parse port number in TcpDarwin")
log.Error("Could not parse port number in TcpDarwin")
continue
}
ports[port] = status

Expand Down Expand Up @@ -108,7 +108,6 @@ Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 172.17.0.2:2222 172.17.0.1:51874 ESTABLISHED 2104/sshd.pam: ci-d
*/
func (i *TcpLinux) Parse(output string) {
fmt.Println(output)
ports := make(map[int]string)
lines := strings.Split(output, "\n")
for index, line := range lines {
Expand Down Expand Up @@ -193,7 +192,8 @@ func (i *TcpWin) Parse(output string) {
portString := address[len(address)-1]
port, err := strconv.Atoi(portString)
if err != nil {
log.Fatal("Could not parse port number in TcpWin")
log.Error("Could not parse port number in TcpWin")
continue
}
ports[port] = status

Expand Down

0 comments on commit 34c9587

Please sign in to comment.