// ModuleOk 获取模块实例
191932
func (s *Application) ModuleOk(args ...string) (app *Module, ok bool) {
	name := s.RootModuleName
	if len(args) > 0 {
		name = args[0]
	}
	app, ok = s.moduleNames[name]
	return
}
109341
func (d *DotGit) Module(name string) (billy.Filesystem, error) {
	return d.fs.Chroot(d.fs.Join(modulePath, name))
}
798171
func (v *validate) GetStructFieldOK() (reflect.Value, reflect.Kind, bool) {
	return v.getStructFieldOKInternal(v.slflParent, v.ct.param)
}
541330
func (d *Device) Modules() []*Device {
	modules := d.LinkedModules
	modules = append(modules, d)

	return modules
}
325910
func NewModuleTree(mods map[string]*Module) *ModuleTreeNode {
	root := &ModuleTreeNode{
		Children: map[Value]*ModuleTreeNode{},
	}
	for _, m := range mods {
		node := root
		for i, x := range m.Package.Path {
			c, ok := node.Children[x.Value]
			if !ok {
				var hide bool
				if i == 1 && x.Value.Compare(SystemDocumentKey) == 0 {
					hide = true
				}
				c = &ModuleTreeNode{
					Key:      x.Value,
					Children: map[Value]*ModuleTreeNode{},
					Hide:     hide,
				}
				node.Children[x.Value] = c
			}
			node = c
		}
		node.Modules = append(node.Modules, m)
	}
	return root
}
550153
func (f *factory) NewSkipHook(hookInfo hook.Info) (Operation, error) {
	hookOp, err := f.NewRunHook(hookInfo)
	if err != nil {
		return nil, err
	}
	return &skipOperation{hookOp}, nil
}
726688
func (s *OrganizationsService) EditHook(ctx context.Context, org string, id int64, hook *Hook) (*Hook, *Response, error) {
	u := fmt.Sprintf("orgs/%v/hooks/%d", org, id)
	req, err := s.client.NewRequest("PATCH", u, hook)
	if err != nil {
		return nil, nil, err
	}
	h := new(Hook)
	resp, err := s.client.Do(ctx, req, h)
	return h, resp, err
}
919146
func (s *basic) Module(name string) (storage.Storer, error) {
	base, err := s.s.Module(name)
	if err != nil {
		return nil, err
	}

	temporal, err := s.temporal.Module(name)
	if err != nil {
		return nil, err
	}

	return NewStorage(base, temporal), nil
}
278760
func (opc *operationCallbacks) CommitHook(hi hook.Info) error {
	switch {
	case hi.Kind.IsRelation():
		return opc.u.relations.CommitHook(hi)
	case hi.Kind.IsStorage():
		return opc.u.storage.CommitHook(hi)
	}
	return nil
}
247363
func (c *Context) GetOk(key interface{}) (interface{}, bool) {
	store := c.getStore()
	val, ok := store[key]
	if !ok {
		if c.Parent != nil {
			return c.Parent.GetOk(key)
		}
	}
	return val, ok
}
977331
func (m *Meta) moduleStorage(root string, mode module.GetMode) *module.Storage {
	s := module.NewStorage(filepath.Join(root, "modules"), m.Services)
	s.Ui = m.Ui
	s.Mode = mode
	return s
}
249855
func (v *OrderedValues) GetOk(key []byte) ([]byte, bool) {
	for _, j := range *v {
		if len(j) > 0 && bytes.Equal(j[0], key) {
			if len(j) > 1 {
				return j[1], true
			}
			return nil, true
		}
	}
	return nil, false
}
1043637
func (l *Result) ParsedModules() map[string]*ast.Module {
	modules := make(map[string]*ast.Module)
	for _, module := range l.Modules {
		modules[module.Name] = module.Parsed
	}
	return modules
}
439525
func (al HALLinks) GetOk(name string) (link *HALLink, ok bool) {
	for _, link = range al.links {
		if strings.ToLower(link.Name) == strings.ToLower(name) {
			ok = true
			return
		}
	}
	link = nil
	return
}
712261
func moduleIndex(L *lua.LState) int {
	index := L.CheckString(2)

	if index == "glob" {
		L.Push(L.NewFunction(glob))
		return 1
	}

	cmd := &shellCommand{
		path: index,
	}

	L.Push(cmd.UserData(L))
	return 1
}
1285915
func (d *FieldData) GetOk(k string) (interface{}, bool) {
	schema, ok := d.Schema[k]
	if !ok {
		return nil, false
	}

	result, ok, err := d.GetOkErr(k)
	if err != nil {
		panic(fmt.Sprintf("error reading %s: %s", k, err))
	}

	if ok && result == nil {
		result = schema.DefaultOrZero()
	}

	return result, ok
}
942144
func IsHelmHook(obj *unstructured.Unstructured) bool {
	annotations := obj.GetAnnotations()
	if annotations == nil {
		return false
	}
	hooks, ok := annotations[common.AnnotationKeyHelmHook]
	if ok && hasHook(hooks, common.AnnotationValueHelmHookCRDInstall) {
		return false
	}
	return ok
}