// Local specifies whether to return local information, i.e. do not retrieve
// the state from master node (default: false).
421577
func (s *IndicesExistsTypeService) Local(local bool) *IndicesExistsTypeService {
	s.local = &local
	return s
}
4842
func (scope *EvalScope) Locals() ([]*Variable, error) {
	if scope.Fn == nil {
		return nil, errors.New("unable to find function context")
	}

	var vars []*Variable
	var depths []int
	varReader := reader.Variables(scope.BinInfo.dwarf, scope.Fn.offset, reader.ToRelAddr(scope.PC, scope.BinInfo.staticBase), scope.Line, true)
	hasScopes := false
	for varReader.Next() {
		entry := varReader.Entry()
		val, err := scope.extractVarInfoFromEntry(entry)
		if err != nil {
			// skip variables that we can't parse yet
			continue
		}
		vars = append(vars, val)
		depth := varReader.Depth()
		if entry.Tag == dwarf.TagFormalParameter {
			if depth <= 1 {
				depth = 0
			}
			isret, _ := entry.Val(dwarf.AttrVarParam).(bool)
			if isret {
				val.Flags |= VariableReturnArgument
			} else {
				val.Flags |= VariableArgument
			}
		}
		depths = append(depths, depth)
		if depth > 1 {
			hasScopes = true
		}
	}

	if err := varReader.Err(); err != nil {
		return nil, err
	}

	if len(vars) <= 0 {
		return vars, nil
	}

	if hasScopes {
		sort.Stable(&variablesByDepth{vars, depths})
	}

	lvn := map[string]*Variable{} // lvn[n] is the last variable we saw named n

	for i, v := range vars {
		if name := v.Name; len(name) > 1 && name[0] == '&' {
			v = v.maybeDereference()
			if v.Addr == 0 {
				v.Unreadable = fmt.Errorf("no address for escaped variable")
			}
			v.Name = name[1:]
			v.Flags |= VariableEscaped
			vars[i] = v
		}
		if hasScopes {
			if otherv := lvn[v.Name]; otherv != nil {
				otherv.Flags |= VariableShadowed
			}
			lvn[v.Name] = v
		}
	}

	return vars, nil
}
1031247
func (s *Session) LocalAddr() net.Addr {
	addr, ok := s.conn.(hasAddr)
	if !ok {
		return &yamuxAddr{"local"}
	}
	return addr.LocalAddr()
}
434104
func (m ModuleInstance) LocalValue(name string) AbsLocalValue {
	return AbsLocalValue{
		Module: m,
		LocalValue: LocalValue{
			Name: name,
		},
	}
}
1125040
func (s *CatAllocationService) Local(local bool) *CatAllocationService {
	s.local = &local
	return s
}
310408
func (config *Config) Local(cmd string) (string, error) {
	if config.DisplayOutput == true {
		fmt.Printf("local: %s\n", cmd)
	}
	var command *exec.Cmd
	command = exec.Command("/bin/sh", "-c", cmd)
	var out bytes.Buffer
	command.Stdout = &out
	err := command.Run()
	if err != nil {
		if config.AbortOnError == true {
			log.Fatalf("%s", err)
		}
		return "", err
	}
	if config.DisplayOutput == true {
		fmt.Printf("%s", out.String())
	}
	return out.String(), nil
}
1207032
func (s *IndicesExistsService) Local(local bool) *IndicesExistsService {
	s.local = &local
	return s
}
1000618
func (db *DB) localSeq(id ID) uint64 {
	return db.fetchUint64(localItemKey(id, dbLocalSeq))
}
806521
func (spec *configSpec) LocalConfig() loader.ConfigContainer {
	spec.local = &LocalConfig{spec: spec}
	return spec.local
}
1197259
func (p *packetConn) LocalAddr() net.Addr {
	return &Addr{
		HardwareAddr: p.ifi.HardwareAddr,
	}
}
236222
func (s *Server) LocalID() string {
	return net.JoinHostPort(s.IP, strconv.Itoa(s.Port))
}
435453
func (s *Action) initLocal(ctx context.Context, c *cli.Context) error {
	ctx = out.AddPrefix(ctx, "[local] ")

	path := ""
	if s.Store != nil {
		path = s.Store.URL()
	}

	out.Print(ctx, "Initializing your local store ...")
	if err := s.init(out.WithHidden(ctx, true), "", path); err != nil {
		return errors.Wrapf(err, "failed to init local store")
	}
	out.Green(ctx, " -> OK")

	out.Print(ctx, "Configuring your local store ...")

	if want, err := termio.AskForBool(ctx, out.Prefix(ctx)+"Do you want to add a git remote?", false); err == nil && want {
		out.Print(ctx, "Configuring the git remote ...")
		if err := s.initSetupGitRemote(ctx, "", ""); err != nil {
			return errors.Wrapf(err, "failed to setup git remote")
		}
		// autosync
		if want, err := termio.AskForBool(ctx, out.Prefix(ctx)+"Do you want to automatically push any changes to the git remote (if any)?", true); err == nil {
			s.cfg.Root.AutoSync = want
		}
	} else {
		s.cfg.Root.AutoSync = false
	}

	// noconfirm
	if want, err := termio.AskForBool(ctx, out.Prefix(ctx)+"Do you want to always confirm recipients when encrypting?", false); err == nil {
		s.cfg.Root.NoConfirm = !want
	}

	// save config
	if err := s.cfg.Save(); err != nil {
		return errors.Wrapf(err, "failed to save config")
	}

	out.Green(ctx, " -> OK")
	return nil
}
902782
func (s *CatAliasesService) Local(local bool) *CatAliasesService {
	s.local = &local
	return s
}
655921
func (s *SnapshotGetRepositoryService) Local(local bool) *SnapshotGetRepositoryService {
	s.local = &local
	return s
}
724488
func ReadLocalConfig() (*LocalConfig, error) {
	task := "Read and parse the local configuration file"

	// Get the global configuration file absolute path.
	path, err := LocalConfigFileAbsolutePath()
	if err != nil {
		return nil, errs.NewError(task, err)
	}

	// Read and parse the file.
	var local LocalConfig
	if err := readAndUnmarshalConfig(path, &local); err != nil {
		return nil, errs.NewError(task, err)
	}

	// Return the config struct.
	return &local, nil
}
429229
func (s *CatHealthService) Local(local bool) *CatHealthService {
	s.local = &local
	return s
}
1362948
func (n *NodeLabels) Get(key string) (value string, has bool) {
	return n.node.memberlist.GetLocalLabel(key)
}