// MapPath returns a path for a BPF map with a given name.
355992
func MapPath(name string) string {
	if components.IsCiliumAgent() {
		once.Do(lockDown)
		return filepath.Join(mapRoot, mapPrefix, name)
	}
	return mapPathFromMountInfo(name)
}
1297384
func JSONPath(t T, r *http.Response, dottedPath string) interface{} {
	var value interface{}
	ExpectJSONHash(t, r, func(doc map[string]interface{}) {
		value = pathFindIn(0, strings.Split(dottedPath, ".")[1:], doc)
	})
	return value
}
996969
func (o *GetEndpointURL) WithBasePath(bp string) *GetEndpointURL {
	o.SetBasePath(bp)
	return o
}
64796
func NewEndpointPath(application, name string) string {
	return fmt.Sprintf(HTTPEndpointPath, application, name)
}
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
}
510538
func (fs *FS) PrefixPath(path string) string {
	return fs.Prefix + string(fs.PathSeparator()) + path
}
1172330
func ApplicationWithPath(
	funcs map[string]func([]string),
	scripts []string,
	loader func(string) ([]byte, error),
	copyEnv bool,
	bashPath string) {

	bash, err := NewContext(bashPath, os.Getenv("DEBUG") != "")
	if err != nil {
		log.Fatal(err)
	}
	for name, fn := range funcs {
		bash.ExportFunc(name, fn)
	}
	if bash.HandleFuncs(os.Args) {
		os.Exit(0)
	}

	for _, script := range scripts {
		bash.Source(script, loader)
	}
	if copyEnv {
		bash.CopyEnv()
	}
	status, err := bash.Run("main", os.Args[1:])
	if err != nil {
		log.Fatal(err)
	}
	os.Exit(status)
}
367052
func GetMap(name string) *Map {
	mutex.RLock()
	defer mutex.RUnlock()

	if !path.IsAbs(name) {
		name = MapPath(name)
	}

	return mapRegister[name]
}
815463
func (s *FieldSort) NestedPath(nestedPath string) *FieldSort {
	s.path = &nestedPath
	return s
}
954019
func OptionHostsPath(path string) SandboxOption {
	return func(sb *sandbox) {
		sb.config.hostsPath = path
	}
}
745715
func (s *SearchService) FilterPath(filterPath ...string) *SearchService {
	s.filterPath = append(s.filterPath, filterPath...)
	return s
}
1224774
func AllPaths(dir string) (map[string]bool, error) {
	m := make(map[string]bool)
	return m, allPaths(m, nil, dir)
}
1018655
func KBFSBinPath(runMode libkb.RunMode, binPath string) (string, error) {
	// If it's brew lookup path by formula name
	if libkb.IsBrewBuild {
		if runMode != libkb.ProductionRunMode {
			return "", fmt.Errorf("Not supported in this run mode")
		}
		kbfsBinName := kbfsBinName()
		prefix, err := brewPath(kbfsBinName)
		if err != nil {
			return "", err
		}
		return filepath.Join(prefix, "bin", kbfsBinName), nil
	}

	return kbfsBinPathDefault(runMode, binPath)
}
482095
func (d *DeviceMapperDriver) devicePath(deviceHash string) string {
	return fmt.Sprintf("/dev/mapper/%s", d.deviceName(deviceHash))
}
796335
func (r Route) StaticPath() string {
	src := r.tmpl.Src
	bidx := strings.IndexByte(src, '{')
	if bidx == -1 || len(src) <= bidx {
		return src // no dynamic part found
	}
	if bidx == 0 { // found at first index,
		// but never happens because of the prepended slash
		return "/"
	}

	return src[:bidx]
}
822157
func (o *Options) Path() string {
	switch {
	case o.LibPath != "":
		return o.LibPath

	case o.LoadDefault == MIT:
		return appendOSExt("libgssapi_krb5")

	case o.LoadDefault == Heimdal:
		return appendOSExt("libgssapi")
	}
	return ""
}
525848
func (r *Request) RoutePath() string {
	if r.route != nil {
		return r.route.Path
	}
	return ""
}