code: func setAddr4(link *netlink.Vxlan, ipn *net.IPNet) error {
  	addrs, err := netlink.AddrList(link, syscall.AF_INET)
  	if err != nil {
  		return err
  	}
  
  	addr := netlink.Addr{IPNet: ipn}
  	existing := false
  	for _, old := range addrs {
  		if old.IPNet.String() == addr.IPNet.String() {
  			existing = true
  			continue
  		}
  		if err = netlink.AddrDel(link, &old); err != nil {
  			return fmt.Errorf("failed to delete IPv4 addr %s from %s", old.String(), link.Attrs().Name)
  		}
  	}
  
  	if !existing {
  		if err = netlink.AddrAdd(link, &addr); err != nil {
  			return fmt.Errorf("failed to add IP address %s to %s: %s", ipn.String(), link.Attrs().Name, err)
  		}
  	}
  
  	return nil
  }
docs: // sets IP4 addr on link removing any existing ones first