mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
more lgtm files from gofmt
R=gri OCL=35485 CL=35488
This commit is contained in:
parent
8231548365
commit
094f1d5990
78 changed files with 1517 additions and 1441 deletions
|
|
@ -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 "";
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue