code: func (d *driver) DeleteEndpoint(nid, eid string) error {
  	defer osl.InitOSContext()()
  	if err := validateID(nid, eid); err != nil {
  		return err
  	}
  	n := d.network(nid)
  	if n == nil {
  		return fmt.Errorf("network id %q not found", nid)
  	}
  	ep := n.endpoint(eid)
  	if ep == nil {
  		return fmt.Errorf("endpoint id %q not found", eid)
  	}
  	if link, err := ns.NlHandle().LinkByName(ep.srcName); err == nil {
  		if err := ns.NlHandle().LinkDel(link); err != nil {
  			logrus.WithError(err).Warnf("Failed to delete interface (%s)'s link on endpoint (%s) delete", ep.srcName, ep.id)
  		}
  	}
  
  	if err := d.storeDelete(ep); err != nil {
  		logrus.Warnf("Failed to remove ipvlan endpoint %.7s from store: %v", ep.id, err)
  	}
  	n.deleteEndpoint(ep.id)
  	return nil
  }
docs: // DeleteEndpoint remove the endpoint and associated netlink interface