code: func (r *Request) Family() int {
  	var a net.IP
  	ip := r.W.RemoteAddr()
  	if i, ok := ip.(*net.UDPAddr); ok {
  		a = i.IP
  	}
  	if i, ok := ip.(*net.TCPAddr); ok {
  		a = i.IP
  	}
  
  	if a.To4() != nil {
  		return 1
  	}
  	return 2
  }
docs: // Family returns the family of the transport, 1 for IPv4 and 2 for IPv6.