code: func getFinalIP(addrs []net.Addr) (net.IP, error) {
  	if len(addrs) > 0 {
  		for i := range addrs {
  			glog.V(4).Infof("Checking addr  %s.", addrs[i].String())
  			ip, _, err := net.ParseCIDR(addrs[i].String())
  			if err != nil {
  				return nil, err
  			}
  			//Only IPv4
  			//TODO : add IPv6 support
  			if ip.To4() != nil {
  				if !ip.IsLoopback() && !ip.IsLinkLocalMulticast() && !ip.IsLinkLocalUnicast() {
  					glog.V(4).Infof("IP found %v", ip)
  					return ip, nil
  				} else {
  					glog.V(4).Infof("Loopback/link-local found %v", ip)
  				}
  			} else {
  				glog.V(4).Infof("%v is not a valid IPv4 address", ip)
  			}
  
  		}
  	}
  	return nil, nil
  }
docs: //getFinalIP method receives all the IP addrs of a Interface
  //and returns a nil if the address is Loopback, Ipv6, link-local or nil.
  //It returns a valid IPv4 if an Ipv4 address is found in the array.