aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/path/path.go
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2009-11-20 11:45:05 -0800
committerRuss Cox <rsc@golang.org>2009-11-20 11:45:05 -0800
commit9ac4449cb2bf8fa1fc414a9cbc67c5a46af8ea51 (patch)
tree41ba750b1ae6464558f8f8bb4871c5233f35924b /src/pkg/path/path.go
parentaa4c638b7baf1f3a0e0fd3ab10bd7c8de74869b9 (diff)
downloadgo-9ac4449cb2bf8fa1fc414a9cbc67c5a46af8ea51.tar.xz
gofmt -r 'α[β:len(α)] -> α[β:]' -w src/cmd src/pkg
R=r, gri CC=golang-dev https://golang.org/cl/156115
Diffstat (limited to 'src/pkg/path/path.go')
-rw-r--r--src/pkg/path/path.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pkg/path/path.go b/src/pkg/path/path.go
index 52ec334a94..e5b9e989d2 100644
--- a/src/pkg/path/path.go
+++ b/src/pkg/path/path.go
@@ -109,7 +109,7 @@ func Clean(path string) string {
func Split(path string) (dir, file string) {
for i := len(path) - 1; i >= 0; i-- {
if path[i] == '/' {
- return path[0 : i+1], path[i+1 : len(path)]
+ return path[0 : i+1], path[i+1:]
}
}
return "", path;
@@ -131,7 +131,7 @@ func Join(dir, file string) string {
func Ext(path string) string {
for i := len(path) - 1; i >= 0 && path[i] != '/'; i-- {
if path[i] == '.' {
- return path[i:len(path)]
+ return path[i:]
}
}
return "";