// NodeExists returns trues if node id exists in the slice
// and false otherwise
353036
func NodeExists(id uint64, nodes []uint64) bool {
	for _, nodeID := range nodes {
		if nodeID == id {
			return true
		}
	}
	return false
}
712127
func compareNodes(l, r *Node) bool {
	return fmt.Sprint(l.Info) < fmt.Sprint(r.Info)
}
883686
func (S3PathChecker) FileExists(path string) bool {
	reader, err := pathio.Reader(path)
	if reader != nil {
		defer reader.Close()
	}
	return err == nil
}
242271
func (s *ExpectedAttributeValue) SetExists(v bool) *ExpectedAttributeValue {
	s.Exists = &v
	return s
}
891796
func CheckExists(ctx context.Context, db *gorm.DB, tableName string, id uuid.UUID) error {
	_, err := Exists(ctx, db, tableName, id.String())
	return err
}
293567
func (a *Assertions) FileExists(path string, msgAndArgs ...interface{}) {
	if h, ok := a.t.(tHelper); ok {
		h.Helper()
	}
	FileExists(a.t, path, msgAndArgs...)
}
306008
func (r *GormWorkItemRepository) CheckExists(ctx context.Context, workitemID uuid.UUID) error {
	defer goa.MeasureSince([]string{"goa", "db", "workitem", "exists"}, time.Now())
	return repository.CheckExists(ctx, r.db, workitemTableName, workitemID)
}
1084447
func managerExists(ns walletdb.ReadBucket) bool {
	if ns == nil {
		return false
	}
	mainBucket := ns.NestedReadBucket(mainBucketName)
	return mainBucket != nil
}
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
}
61229
func (m *nfsMounter) serverExists(server string) bool {
	for _, v := range m.servers {
		if v == server || v == NFSAllServers {
			return true
		}
	}
	return false
}
1138058
func (doc *DesignDoc) CheckExists(viewName string) (int, bool) {

	index := 0
	for index, view := range doc.Views {
		if viewName == view.Name {
			return index, true
		}
	}
	if doc.LastView != nil {
		if viewName == doc.LastView.Name {
			return -1, true
		}
	}
	return index, false
}
546129
func (vs *VSphere) InstanceExistsByProviderID(ctx context.Context, providerID string) (bool, error) {
	nodeName, err := vs.GetNodeNameFromProviderID(providerID)
	if err != nil {
		klog.Errorf("Error while getting nodename for providerID %s", providerID)
		return false, err
	}
	_, err = vs.InstanceID(ctx, convertToK8sType(nodeName))
	if err == nil {
		return true, nil
	}

	return false, err
}
377212
func ruleExists(rules []cloudapi.FirewallRule, rule string) (bool, string) {
	for _, r := range rules {
		if strings.EqualFold(r.Rule, rule) {
			return true, r.Id
		}
	}

	return false, ""
}
1239536
func (d Data) FileExists(key string) bool {
	_, found := d.Files[key]
	return found
}
177740
func (c *edgeCollection) DocumentExists(ctx context.Context, key string) (bool, error) {
	if result, err := c.rawCollection().DocumentExists(ctx, key); err != nil {
		return false, WithStack(err)
	} else {
		return result, nil
	}
}
970496
func ModifierExists(name string, fn func(json, arg string) string) bool {
	_, ok := modifiers[name]
	return ok
}
1222636
func (s *resourceServiceImpl) CheckExists(ctx context.Context, resourceID string) error {
	return s.Repositories().ResourceRepository().CheckExists(ctx, resourceID)
}