diff options
author | Ondřej Surý <ondrej@sury.org> | 2011-08-03 16:54:30 +0200 |
---|---|---|
committer | Ondřej Surý <ondrej@sury.org> | 2011-08-03 16:54:30 +0200 |
commit | 28592ee1ea1f5cdffcf85472f9de0285d928cf12 (patch) | |
tree | 32944e18b23f7fe4a0818a694aa2a6dfb1835463 /src/pkg/exec/lp_unix.go | |
parent | e836bee4716dc0d4d913537ad3ad1925a7ac32d0 (diff) | |
download | golang-upstream/59.tar.gz |
Imported Upstream version 59upstream/59
Diffstat (limited to 'src/pkg/exec/lp_unix.go')
-rw-r--r-- | src/pkg/exec/lp_unix.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pkg/exec/lp_unix.go b/src/pkg/exec/lp_unix.go index 3fc3be832..008fb11a8 100644 --- a/src/pkg/exec/lp_unix.go +++ b/src/pkg/exec/lp_unix.go @@ -10,7 +10,7 @@ import ( ) // ErrNotFound is the error resulting if a path search failed to find an executable file. -var ErrNotFound = os.ErrorString("executable file not found in $PATH") +var ErrNotFound = os.NewError("executable file not found in $PATH") func findExecutable(file string) os.Error { d, err := os.Stat(file) @@ -39,7 +39,7 @@ func LookPath(file string) (string, os.Error) { return "", &Error{file, err} } pathenv := os.Getenv("PATH") - for _, dir := range strings.Split(pathenv, ":", -1) { + for _, dir := range strings.Split(pathenv, ":") { if dir == "" { // Unix shell semantics: path element "" means "." dir = "." |