code: func (a *Agent) IPVersion() string {
  	version := constants.IPv4
  
  	ipPort := a.RemoteAddr().String()
  	if strings.Count(ipPort, ":") > 1 {
  		version = constants.IPv6
  	}
  
  	return version
  }
docs: // IPVersion returns the remote address ip version.
  // net.TCPAddr and net.UDPAddr implementations of String()
  // always construct result as <ip>:<port> on both
  // ipv4 and ipv6. Also, to see if the ip is ipv6 they both
  // check if there is a colon on the string.
  // So checking if there are more than one colon here is safe.