code: func lastIP(n *net.IPNet) net.IP {
  	mask := n.Mask
  	ip := n.IP
  	lastip := make(net.IP, len(ip))
  	// set bits zero in the mask to ones in ip
  	for i, m := range mask {
  		lastip[i] = (^m) | ip[i]
  	}
  	return lastip
  }
docs: // Last IP (broadcast) address in a network (net.IPNet)