ginbump/request_address.go
func ParseForwarded(ipList string) string {
	for _, ip := range strings.Split(ipList, ",") {
		ip = strings.TrimSpace(ip)

		if parsed := net.ParseIP(ip); parsed != nil && IsPublicIP(parsed) {
			return ip
		}
	}

	return ""
}
func ParseForwarded(ipList string) string {
	for _, ip := range strings.Split(ipList, ",") {
		ip = strings.TrimSpace(ip)

		if parsed := net.ParseIP(ip); parsed != nil && IsPublicIP(parsed) {
			return ip
		}
	}

	return ""
}
func ParseForwarded ( ipList string ) string { for _ , ip := range strings . Split ( ipList , " " ) { ip = strings . TrimSpace ( ip ) if parsed := net . ParseIP ( ip ) ; parsed != nil && IsPublicIP ( parsed ) { return ip } } return " " }
// ParseForwarded parses the value of the X-Forwarded-For Header and returns the
// IP address.
ParseForwarded parses the value of the X - Forwarded - For Header and returns the IP address .