Updating the Port Scanning Functionality

Let's update the port scanning functionality now.

Updating the cmd/scan.go file

We edit the import section and add the io package to use the io.Writer interface, the os package to use the os.Stdout, and our scan package for the port scan functionality:

Get hands-on with 1400+ tech skills courses.