// parentExists check if the specified interface exists in the default namespace
337214
func parentExists(ifaceStr string) bool {
	_, err := ns.NlHandle().LinkByName(ifaceStr)
	if err != nil {
		return false
	}

	return true
}
1315385
func (r *GormWorkItemTypeRepository) CheckExists(ctx context.Context, id uuid.UUID) error {
	defer goa.MeasureSince([]string{"goa", "db", "workitemtype", "exists"}, time.Now())
	log.Info(ctx, map[string]interface{}{
		"wit_id": id,
	}, "Checking if work item type exists")

	_, exists := cache.Get(id)
	if exists {
		return nil
	}
	return repository.CheckExists(ctx, r.db, WorkItemType{}.TableName(), id)
}
799110
func volumeExists(ctx context.Context, store *drivers.Store, v volume.Volume) (bool, error) {
	exists, err := lookupVolume(ctx, store, v.DriverName(), v.Name())
	if err != nil {
		return false, err
	}
	return exists != nil, nil
}
1359967
func (r *GormRepository) CheckExists(ctx context.Context, id uuid.UUID) error {
	return repository.CheckExists(ctx, r.db, SpaceTemplate{}.TableName(), id)
}
709015
func (c *Client) IndexExists(indices ...string) *IndicesExistsService {
	return NewIndicesExistsService(c).Index(indices)
}
1222636
func (s *resourceServiceImpl) CheckExists(ctx context.Context, resourceID string) error {
	return s.Repositories().ResourceRepository().CheckExists(ctx, resourceID)
}
808109
func (nrt *NRTCachingDirectory) FileExists(name string) bool {
	nrt.Lock() // synchronized
	defer nrt.Unlock()
	return nrt._fileExists(name)
}
207322
func (k *Kubernetes) filteredNamespaceExists(namespace string) bool {
	ns, err := k.APIConn.GetNamespaceByName(namespace)
	if err != nil {
		return false
	}
	return ns.ObjectMeta.Name == namespace
}
977379
func (l ScopeList) ParentScopes(scope string) ScopeList {
	scopes := l.Copy()

	for i, s := range scopes {
		if s == scope {
			return scopes[:i]
		}
	}

	return ScopeList{}
}
970644
func (c *BundlingChecker) PresumeExists(item *Item) {
	c.mu.Lock()
	defer c.mu.Unlock()
	c.existingDigests[string(item.Digest)] = struct{}{}
}
315578
func (r *GormTrackerRepository) CheckExists(ctx context.Context, id uuid.UUID) error {
	return repository.CheckExists(ctx, r.db, trackersTableName, id)
}
205448
func (s *DiscoverySupport) ChannelExists(channel string) bool {
	return s.SelfChannelInfo(common.ChainID(channel)) != nil
}
900666
func (c *Connector) ScopeExists(ctx context.Context, scope string) (bool, error) {
	panic("not implemented")
}
61229
func (m *nfsMounter) serverExists(server string) bool {
	for _, v := range m.servers {
		if v == server || v == NFSAllServers {
			return true
		}
	}
	return false
}
930436
func (s *ExistsService) Parent(parent string) *ExistsService {
	s.parent = parent
	return s
}
1120843
func (sm *SourceMgr) SourceExists(id ProjectIdentifier) (bool, error) {
	if atomic.CompareAndSwapInt32(&sm.releasing, 1, 1) {
		return false, smIsReleased{}
	}

	srcg, err := sm.srcCoord.getSourceGatewayFor(context.TODO(), id)
	if err != nil {
		return false, err
	}

	ctx := context.TODO()
	return srcg.existsInCache(ctx) || srcg.existsUpstream(ctx), nil
}
710638
func (c *Client) IndexTemplateExists(name string) *IndicesExistsTemplateService {
	return NewIndicesExistsTemplateService(c).Name(name)
}