// unitStatePath generates a keypath where the UnitState object for a given
// machine ID + jobName combination is stored
14154
func (r *EtcdRegistry) unitStatePath(machID, jobName string) string {
	return path.Join(r.unitStatesNamespace(jobName), machID)
}
916009
func parseRawPath(rawPath string) (*pathexp.PathExp, *string, error) {
	idx := strings.LastIndex(rawPath, "/")
	if idx == -1 {
		return nil, nil, errs.NewExitError("resource path format is incorrect.")
	}
	secret := rawPath[idx+1:]
	path := rawPath[:idx]

	if secret == "**" {
		path = rawPath
		secret = "*"
	}

	// Ensure that the secret name is valid
	if !pathexp.ValidSecret(secret) {
		return nil, nil, errs.NewExitError("Invalid secret name " + secret)
	}

	pe, err := parsePathExp(path)
	if err != nil {
		return nil, nil, errs.NewErrorExitError("Invalid path expression", err)
	}
	return pe, &secret, nil
}
1099215
func (prof *Profiler) SysFSSystemPath(s string) {
	prof.sysFSSystemPath = s
	prof.setCPUPath()
}
237879
func (s *InitiateJobOutput) SetJobOutputPath(v string) *InitiateJobOutput {
	s.JobOutputPath = &v
	return s
}
1317690
func repoToKubernetesPath(repo provider.Repo) string {
	path := fmt.Sprintf("%s/src/%s/%s", Gopath(), "k8s.io", repo.Name())
	return path
}
716793
func (a Arg) SetKeyPath(keyPath string) Arg {
	a.KeyPath = keyPath
	return a
}
309103
func internalKeyPath(index uint32) waddrmgr.DerivationPath {
	return waddrmgr.DerivationPath{
		Account: waddrmgr.DefaultAccountNum,
		Branch:  waddrmgr.InternalBranch,
		Index:   index,
	}
}
486956
func (wd *WaitDelay) WithInputPath(inputPath string) TransitionState {
	wd.inputPath = inputPath
	return wd
}
180566
func (s *Settings) ObjectPath(obj *api.ObjectRef) string {
	return s.StorageGSPath + "/" + obj.HashAlgo.String() + "/" + obj.HexDigest
}
1035085
func (c *Client) GetURLForStateFile(instance url.URL) url.URL {
	return AppendPath(instance, "master/state")
}
755448
func (m *MockConfig) SystemIdentityPath() string {
	ret := m.ctrl.Call(m, "SystemIdentityPath")
	ret0, _ := ret[0].(string)
	return ret0
}
355992
func MapPath(name string) string {
	if components.IsCiliumAgent() {
		once.Do(lockDown)
		return filepath.Join(mapRoot, mapPrefix, name)
	}
	return mapPathFromMountInfo(name)
}
1008957
func JavaPath(path string) ServiceOption {
	return func(s *Service) error {
		s.javaPath = path
		return nil
	}
}
832599
func AssetsPath() string {
	if caddyPath := os.Getenv("CADDYPATH"); caddyPath != "" {
		return caddyPath
	}
	return filepath.Join(userHomeDir(), ".caddy")
}
899116
func (w *Walker) processPath(path string) error {
	defer w.wg.Done()

	names, err := readDirNames(path)
	if err != nil {
		return err
	}

	root := path
	for _, name := range names {
		path = filepath.Join(root, name)
		info, err := os.Lstat(path)
		err = w.walkFunc(path, info, err)

		if err == nil && info.IsDir() {
			w.addJob(path)
		}
		if err != nil && err != filepath.SkipDir {
			return err
		}
	}
	return nil
}
497993
func (ns *Nstat) loadPaths() {
	if ns.ProcNetNetstat == "" {
		ns.ProcNetNetstat = proc(ENV_NETSTAT, NET_NETSTAT)
	}
	if ns.ProcNetSNMP == "" {
		ns.ProcNetSNMP = proc(ENV_SNMP, NET_SNMP)
	}
	if ns.ProcNetSNMP6 == "" {
		ns.ProcNetSNMP6 = proc(ENV_SNMP6, NET_SNMP6)
	}
}
837884
func (al *aliasList) aliasPath(nm string) (string, error) {
	for ind, name := range al.namesList {
		if nm == name {
			return fmt.Sprintf("#%d", ind), nil
		}
	}
	al.namesList = append(al.namesList, nm)
	return fmt.Sprintf("#%d", len(al.namesList)-1), nil
}