Skip to content

Commit b88f034

Browse files
init commit
1 parent 5cc63e3 commit b88f034

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

main.go

+9-6
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,23 @@ import (
55
"runtime"
66
"sort"
77

8-
"github/mytechnotalent/turbo-scanner/routine"
8+
"github.com/mytechnotalent/turbo-scanner/routine"
9+
"github.com/mytechnotalent/turbo-scanner/services"
10+
"github.com/mytechnotalent/turbo-scanner/setup"
911
)
1012

1113
func main() {
1214
if runtime.GOOS == "linux" {
13-
linuxSetup()
15+
setup.LinuxSetup()
1416
}
1517

18+
var host string
1619
ports := make(chan int, 1000)
1720
results := make(chan int)
1821
var openports []int
1922

2023
for i := 0; i < cap(ports); i++ {
21-
go routine.Routine(ports, results)
24+
go routine.Routine(&host, ports, results)
2225
}
2326

2427
go func() {
@@ -40,11 +43,11 @@ func main() {
4043
for _, port := range openports {
4144
fmt.Printf("%d open\n", port)
4245
if runtime.GOOS == "windows" {
43-
fmt.Println(winService(&port))
46+
fmt.Println(services.WinService(&port))
4447
} else if runtime.GOOS == "darwin" {
45-
fmt.Println(macService(&port))
48+
fmt.Println(services.MacService(&port))
4649
} else if runtime.GOOS == "linux" {
47-
fmt.Println(linuxService(&port))
50+
fmt.Println(services.LinuxService(&port))
4851
}
4952
}
5053

0 commit comments

Comments
 (0)