summaryrefslogtreecommitdiff
path: root/src/pkg/path/path.go
diff options
context:
space:
mode:
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 "";
}
-