code: func resolveInputIPAddr(input string, isUnspecifiedValid bool) (net.IP, error) {
  	// Try to see if it is an interface name
  	interfaceAddr, err := resolveInterfaceAddr(input)
  	if err == nil {
  		return interfaceAddr, nil
  	}
  	// String matched interface but there is a potential ambiguity to be resolved
  	if err != errNoSuchInterface {
  		return nil, err
  	}
  
  	// String is not an interface check if it is a valid IP
  	if ip := net.ParseIP(input); ip != nil && (isUnspecifiedValid || !ip.IsUnspecified()) {
  		return ip, nil
  	}
  
  	// Not valid IP found
  	return nil, errBadNetworkIdentifier
  }
docs: // resolveInputIPAddr tries to resolve the IP address from the string passed as input
  // - tries to match the string as an interface name, if so returns the IP address associated with it
  // - on failure of previous step tries to parse the string as an IP address itself
  //	 if succeeds returns the IP address