Lines Matching full:path
12 "path/filepath"
16 // ErrNotFound is the error resulting if a path search failed to find an executable file.
17 var ErrNotFound = errors.New("executable file not found in $PATH")
31 // in the directories named by the PATH environment variable.
32 // If file contains a slash, it is tried directly and the PATH is not consulted.
33 // The result may be an absolute path or a path relative to the current directory.
36 // (only bypass the path if file begins with / or ./ or ../)
46 path := os.Getenv("PATH")
47 for _, dir := range filepath.SplitList(path) {
49 // Unix shell semantics: path element "" means "."
52 path := filepath.Join(dir, file)
53 if err := findExecutable(path); err == nil {
54 return path, nil