You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: main.go
    path of file: ./repos/goHackTools/projects/43_netScan
    
    the code of the file until where you have to start completion: // Finding named hosts on a network

package main

import (
	"fmt"
	"net"
	"os"
	"strconv"
	"strings"
)

func main() {
	if len(os.Args) != 2 {
		fmt.Fprintf(os.Stdout, "Using: %s ip-addr\n", os.Args[0])
		fmt
    
func main() {
	if len(os.Args) != 2 {
		fmt.Fprintf(os.Stdout, "Using: %s ip-addr\n", os.Args[0])
		fmt.Fprintf(os.Stdout, "First three octets. Ex: 192.168.0\n")
		os.Exit(1)
	}

	subnetToScan := os.Args[1]

	activeThreads := 0
	doneChannel := make(chan bool)

	for ip := 0; ip <= 255; ip++ {
		fullIP := subnetToScan + "." + strconv.Itoa(ip)
		go resolve(fullIP, doneChannel)
		activeThreads++
	}

	// Wait for all threads to finish
	for activeThreads > 0 {
		<-doneChannel
		activeThreads--
	}
}