code: func NetConnLookup(conn net.Conn) (net.IP, error) {
  	if conn == nil {
  		return nil, errors.New("whitelist: no connection")
  	}
  
  	netAddr := conn.RemoteAddr()
  	if netAddr == nil {
  		return nil, errors.New("whitelist: no address returned")
  	}
  
  	addr, _, err := net.SplitHostPort(netAddr.String())
  	if err != nil {
  		return nil, err
  	}
  
  	ip := net.ParseIP(addr)
  	return ip, nil
  }
docs: // NetConnLookup extracts an IP from the remote address in the
  // net.Conn. A single net.Conn should be passed to Address.