summaryrefslogtreecommitdiff
path: root/src/pkg/path/path.go
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2009-10-08 15:14:54 -0700
committerRuss Cox <rsc@golang.org>2009-10-08 15:14:54 -0700
commit79244ca7360f32db37710ab74c72214146397edf (patch)
tree0f7c5551b95f4e5dd567a4ac3233afeb0da61e99 /src/pkg/path/path.go
parent71b9ef8c235f052495a1fb29bd3945f7094998a9 (diff)
downloadgolang-79244ca7360f32db37710ab74c72214146397edf.tar.gz
more lgtm files from gofmt
R=gri OCL=35485 CL=35488
Diffstat (limited to 'src/pkg/path/path.go')
-rw-r--r--src/pkg/path/path.go11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/pkg/path/path.go b/src/pkg/path/path.go
index 49ea25db6..7fa8b863b 100644
--- a/src/pkg/path/path.go
+++ b/src/pkg/path/path.go
@@ -27,7 +27,7 @@ import "strings"
// http://plan9.bell-labs.com/sys/doc/lexnames.html
func Clean(path string) string {
if path == "" {
- return "."
+ return ".";
}
rooted := path[0] == '/';
@@ -105,10 +105,10 @@ 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 : len(path)];
}
}
- return "", path
+ return "", path;
}
// Join joins dir and file into a single path, adding a separating
@@ -117,7 +117,7 @@ func Join(dir, file string) string {
if dir == "" {
return file;
}
- return Clean(dir + "/" + file);
+ return Clean(dir+"/"+file);
}
// Ext returns the file name extension used by path.
@@ -130,6 +130,5 @@ func Ext(path string) string {
return path[i:len(path)];
}
}
- return ""
+ return "";
}
-