// HasVM mocks base method
546128
func (m *MockCloud) HasVM(arg0 string) (bool, error) {
	ret := m.ctrl.Call(m, "HasVM", arg0)
	ret0, _ := ret[0].(bool)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}
416642
func (m *Mocker) Mock(w io.Writer, name ...string) error {
	if len(name) == 0 {
		return errors.New("must specify one interface")
	}

	doc := doc{
		PackageName: m.pkgName,
		Imports:     moqImports,
	}

	mocksMethods := false

	tpkg := m.srcPkg.Types
	for _, n := range name {
		iface := tpkg.Scope().Lookup(n)
		if iface == nil {
			return fmt.Errorf("cannot find interface %s", n)
		}
		if !types.IsInterface(iface.Type()) {
			return fmt.Errorf("%s (%s) not an interface", n, iface.Type().String())
		}
		iiface := iface.Type().Underlying().(*types.Interface).Complete()
		obj := obj{
			InterfaceName: n,
		}
		for i := 0; i < iiface.NumMethods(); i++ {
			mocksMethods = true
			meth := iiface.Method(i)
			sig := meth.Type().(*types.Signature)
			method := &method{
				Name: meth.Name(),
			}
			obj.Methods = append(obj.Methods, method)
			method.Params = m.extractArgs(sig, sig.Params(), "in%d")
			method.Returns = m.extractArgs(sig, sig.Results(), "out%d")
		}
		doc.Objects = append(doc.Objects, obj)
	}

	if mocksMethods {
		doc.Imports = append(doc.Imports, "sync")
	}

	for pkgToImport := range m.imports {
		doc.Imports = append(doc.Imports, stripVendorPath(pkgToImport))
	}

	if tpkg.Name() != m.pkgName {
		doc.SourcePackagePrefix = tpkg.Name() + "."
		doc.Imports = append(doc.Imports, tpkg.Path())
	}

	var buf bytes.Buffer
	err := m.tmpl.Execute(&buf, doc)
	if err != nil {
		return err
	}
	formatted, err := format.Source(buf.Bytes())
	if err != nil {
		return fmt.Errorf("go/format: %s", err)
	}
	if _, err := w.Write(formatted); err != nil {
		return err
	}
	return nil
}
1242134
func (iter *MockStateRangeQueryIterator) HasNext() bool {
	if iter.Closed {
		// previously called Close()
		mockLogger.Debug("HasNext() but already closed")
		return false
	}

	if iter.Current == nil {
		mockLogger.Error("HasNext() couldn't get Current")
		return false
	}

	current := iter.Current
	for current != nil {
		// if this is an open-ended query for all keys, return true
		if iter.StartKey == "" && iter.EndKey == "" {
			return true
		}
		comp1 := strings.Compare(current.Value.(string), iter.StartKey)
		comp2 := strings.Compare(current.Value.(string), iter.EndKey)
		if comp1 >= 0 {
			if comp2 < 0 {
				mockLogger.Debug("HasNext() got next")
				return true
			} else {
				mockLogger.Debug("HasNext() but no next")
				return false

			}
		}
		current = current.Next()
	}

	// we've reached the end of the underlying values
	mockLogger.Debug("HasNext() but no next")
	return false
}
354882
func (m *MockState) Machines(arg0 ...names_v2.MachineTag) ([]provisioner.MachineResult, error) {
	varargs := []interface{}{}
	for _, a := range arg0 {
		varargs = append(varargs, a)
	}
	ret := m.ctrl.Call(m, "Machines", varargs...)
	ret0, _ := ret[0].([]provisioner.MachineResult)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}
812094
func (*Service) CreateVM(c context.Context, req *crimson.CreateVMRequest) (*crimson.VM, error) {
	return createVM(c, req.Vm)
}
592173
func haveAVX() bool {
	_, _, c, _ := cpuid(1)

	// Check XGETBV, OXSAVE and AVX bits
	if c&(1<<26) != 0 && c&(1<<27) != 0 && c&(1<<28) != 0 {
		// Check for OS support
		eax, _ := xgetbv(0)
		return (eax & 0x6) == 0x6
	}
	return false
}
454920
func (s *Session) HasKey(key string) bool {
	s.RLock()
	defer s.RUnlock()

	_, has := s.data[key]
	return has
}
1247747
func (m *MockInterface) BatchV2alpha1() v2alpha1.BatchV2alpha1Interface {
	ret := m.ctrl.Call(m, "BatchV2alpha1")
	ret0, _ := ret[0].(v2alpha1.BatchV2alpha1Interface)
	return ret0
}
886511
func (m *MockInterface) SettingsV1alpha1() v1alpha12.SettingsV1alpha1Interface {
	ret := m.ctrl.Call(m, "SettingsV1alpha1")
	ret0, _ := ret[0].(v1alpha12.SettingsV1alpha1Interface)
	return ret0
}
460127
func (f *validationFailer) HasErrors() bool {
	f.mux.Lock()
	defer f.mux.Unlock()
	return len(f.errs) > 0
}
1036397
func (env *OsEnvReader) HasKeys(keys []string) (bool, []string) {
	missingKeys := []string{}
	for _, key := range keys {
		if _, ok := env.LookupEnv(key); !ok {
			missingKeys = append(missingKeys, key)
		}
	}

	return len(missingKeys) == 0, missingKeys
}
456603
func (m *MultiError) HasError() error {
	m.mutex.Lock()
	defer m.mutex.Unlock()
	if len(m.errs) == 0 {
		return nil
	}

	return m
}
186147
func (em *EventManager) HasEvent(m string) bool {
	var ok bool
	em.ro.RLock()
	_, ok = em.events[m]
	em.ro.RUnlock()
	return ok
}
405270
func (s *GlobalStore) HasKey(addr common.Address, key []byte) bool {
	has, err := s.db.Has(indexForHashesPerNode(addr, key), nil)
	if err != nil {
		has = false
	}
	return has
}
720688
func GetVM(structPtr interface{}) *ViewModel {
	vm, ok := vMap[structPtr]
	if !ok {
		panic("GetVM: Vue not registerd yet")
	}
	return vm
}
138558
func Has(keyvals []KeyVal, keyword string) []KeyVal {
	return HasKeyword(keyvals, Keyword(keyword))
}
910754
func HasVerbose(ctx context.Context) bool {
	_, ok := ctx.Value(ctxKeyVerbose).(bool)
	return ok
}