summaryrefslogtreecommitdiff
path: root/src/pkg/exec
diff options
context:
space:
mode:
authorOndřej Surý <ondrej@sury.org>2011-07-08 09:16:22 +0200
committerOndřej Surý <ondrej@sury.org>2011-07-08 09:52:32 +0200
commit85cafef129c3826b0c5e290c89cfc7251fba43d5 (patch)
treee59b124753eb1eec194ec682a7815c401388f10d /src/pkg/exec
parent67c487c4bd0fc91c2ce5972886d108e0d2939064 (diff)
downloadgolang-85cafef129c3826b0c5e290c89cfc7251fba43d5.tar.gz
Imported Upstream version 2011.07.07
Diffstat (limited to 'src/pkg/exec')
-rw-r--r--src/pkg/exec/exec_test.go2
-rw-r--r--src/pkg/exec/lp_plan9.go2
-rw-r--r--src/pkg/exec/lp_unix.go2
-rw-r--r--src/pkg/exec/lp_windows.go4
4 files changed, 5 insertions, 5 deletions
diff --git a/src/pkg/exec/exec_test.go b/src/pkg/exec/exec_test.go
index c45a7d70a..f6cebb905 100644
--- a/src/pkg/exec/exec_test.go
+++ b/src/pkg/exec/exec_test.go
@@ -55,7 +55,7 @@ func TestCatGoodAndBadFile(t *testing.T) {
t.Errorf("expected Waitmsg from cat combined; got %T: %v", err, err)
}
s := string(bs)
- sp := strings.Split(s, "\n", 2)
+ sp := strings.SplitN(s, "\n", 2)
if len(sp) != 2 {
t.Fatalf("expected two lines from cat; got %q", s)
}
diff --git a/src/pkg/exec/lp_plan9.go b/src/pkg/exec/lp_plan9.go
index c4e2a7a0f..e4751a4df 100644
--- a/src/pkg/exec/lp_plan9.go
+++ b/src/pkg/exec/lp_plan9.go
@@ -42,7 +42,7 @@ func LookPath(file string) (string, os.Error) {
}
path := os.Getenv("path")
- for _, dir := range strings.Split(path, "\000", -1) {
+ for _, dir := range strings.Split(path, "\000") {
if err := findExecutable(dir + "/" + file); err == nil {
return dir + "/" + file, nil
}
diff --git a/src/pkg/exec/lp_unix.go b/src/pkg/exec/lp_unix.go
index cdf720768..008fb11a8 100644
--- a/src/pkg/exec/lp_unix.go
+++ b/src/pkg/exec/lp_unix.go
@@ -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 = "."
diff --git a/src/pkg/exec/lp_windows.go b/src/pkg/exec/lp_windows.go
index 47763458f..7581088eb 100644
--- a/src/pkg/exec/lp_windows.go
+++ b/src/pkg/exec/lp_windows.go
@@ -47,7 +47,7 @@ func LookPath(file string) (f string, err os.Error) {
x = `.COM;.EXE;.BAT;.CMD`
}
exts := []string{}
- for _, e := range strings.Split(strings.ToLower(x), `;`, -1) {
+ for _, e := range strings.Split(strings.ToLower(x), `;`) {
if e == "" {
continue
}
@@ -67,7 +67,7 @@ func LookPath(file string) (f string, err os.Error) {
return
}
} else {
- for _, dir := range strings.Split(pathenv, `;`, -1) {
+ for _, dir := range strings.Split(pathenv, `;`) {
if f, err = findExecutable(dir+`\`+file, exts); err == nil {
return
}