Skip to content
This repository was archived by the owner on Jul 8, 2023. It is now read-only.

Commit 9cc2b34

Browse files
authored
Update README.md
1 parent 374d41a commit 9cc2b34

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

README.md

+7-6
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,22 @@ Fast library for scanning ports of a host
99
## How to use?
1010
You need to give a host address and port range, after that the scanner will
1111
check the ports and returns the open ports.
12+
1213
```go
1314
package main
1415

1516
import (
16-
"fmt"
17+
"fmt"
1718

18-
scanner "github.com/amirhnajafiz/port-scanner"
19+
scanner "github.com/amirhnajafiz/port-scanner"
1920
)
2021

2122
func main() {
2223
// creating scanner with URI, Port Range, Number of workers (optional, default is 100)
23-
openports := scanner.Scan("", 2048)
24+
openports := scanner.Scan("", 2048)
2425

25-
for _, port := range openports {
26-
fmt.Printf("%d open\n", port)
27-
}
26+
for _, port := range openports {
27+
fmt.Printf("%d open\n", port)
28+
}
2829
}
2930
```

0 commit comments

Comments
 (0)