go-internal: github.com/rogpeppe/go-internal/internal/os/execpath Index | Files

package execpath

import "github.com/rogpeppe/go-internal/internal/os/execpath"


Package Files

exec.go lp_unix.go


var ErrNotFound = exec.ErrNotFound

ErrNotFound is the error resulting if a path search failed to find an executable file.

func Look Uses

func Look(file string, getenv func(string) string) (string, error)

Look searches for an executable named file, using getenv to look up environment variables. If getenv is nil, os.Getenv will be used. If file contains a slash, it is tried directly and getenv will not be called. The result may be an absolute path or a path relative to the current directory.

type Error Uses

type Error = exec.Error

Package execpath imports 4 packages (graph) and is imported by 2 packages. Updated 2019-01-18. Refresh now. Tools for package owners.