Skip to content

Commit

Permalink
make private
Browse files Browse the repository at this point in the history
  • Loading branch information
absolutelightning committed Aug 28, 2023
1 parent 18eadb4 commit 900f7f0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
5 changes: 2 additions & 3 deletions troubleshoot/ports/troubleshoot_ports.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,10 @@ func TroubleshootRun(ports []string, host string) {

var counter = 0

tcpTroubleShoot := TroubleShootTcp{}

for _, port := range ports {
counter += 1
go tcpTroubleShoot.test(&hostPort{host: host, port: port}, resultsChannel)
tcpTroubleShoot := troubleShootTcp{}
go tcpTroubleShoot.dailPort(&hostPort{host: host, port: port}, resultsChannel)
}
for itr := 0; itr < counter; itr++ {
fmt.Print(<-resultsChannel)
Expand Down
4 changes: 2 additions & 2 deletions troubleshoot/ports/troubleshoot_protocol.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
package ports

type TroubleShootProtocol interface {
test(hostPort *hostPort, ch chan string)
type troubleShootProtocol interface {
dailPort(hostPort *hostPort, ch chan string)
}
4 changes: 2 additions & 2 deletions troubleshoot/ports/troubleshoot_tcp.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import (
"time"
)

type TroubleShootTcp struct {
type troubleShootTcp struct {
}

func (tcp *TroubleShootTcp) test(hostPort *hostPort, ch chan string) {
func (tcp *troubleShootTcp) dailPort(hostPort *hostPort, ch chan string) {
address := net.JoinHostPort(hostPort.host, hostPort.port)

// Attempt to establish a TCP connection with a timeout.
Expand Down

0 comments on commit 900f7f0

Please sign in to comment.