summaryrefslogtreecommitdiff
path: root/libgo/go/exec/lp_plan9.go
diff options
context:
space:
mode:
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2011-12-03 02:17:34 +0000
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2011-12-03 02:17:34 +0000
commit6692ad1d1b2710fc619d04aad2ae0668cc59f4db (patch)
tree7f76eff391f37fe6467ff4ffbc0c582c9959ea30 /libgo/go/exec/lp_plan9.go
parent96265ae6967d08ca35d36e87b7588c0c9e6e5cca (diff)
downloadgcc-6692ad1d1b2710fc619d04aad2ae0668cc59f4db.tar.gz
libgo: Update to weekly.2011-11-02.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@181964 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgo/go/exec/lp_plan9.go')
-rw-r--r--libgo/go/exec/lp_plan9.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/libgo/go/exec/lp_plan9.go b/libgo/go/exec/lp_plan9.go
index e4751a4df29..d4ffc17c006 100644
--- a/libgo/go/exec/lp_plan9.go
+++ b/libgo/go/exec/lp_plan9.go
@@ -5,14 +5,15 @@
package exec
import (
+ "errors"
"os"
"strings"
)
// ErrNotFound is the error resulting if a path search failed to find an executable file.
-var ErrNotFound = os.NewError("executable file not found in $path")
+var ErrNotFound = errors.New("executable file not found in $path")
-func findExecutable(file string) os.Error {
+func findExecutable(file string) error {
d, err := os.Stat(file)
if err != nil {
return err
@@ -27,7 +28,7 @@ func findExecutable(file string) os.Error {
// in the directories named by the path environment variable.
// If file begins with "/", "#", "./", or "../", it is tried
// directly and the path is not consulted.
-func LookPath(file string) (string, os.Error) {
+func LookPath(file string) (string, error) {
// skip the path lookup for these prefixes
skip := []string{"/", "#", "./", "../"}