refactoring, go fmt

This commit is contained in:
Chris Lu
2019-03-25 23:18:40 -07:00
parent 19728fe3f6
commit 7a14cdc90c
7 changed files with 34 additions and 50 deletions

View File

@@ -42,10 +42,10 @@ func (c *commandFsDu) Do(args []string, commandEnv *commandEnv, writer io.Writer
dir, name := filer2.FullPath(path).DirAndName()
if strings.HasSuffix(path, "/") {
if path == "/"{
if path == "/" {
dir, name = "/", ""
}else{
dir, name = path[0 : len(path)-1], ""
} else {
dir, name = path[0:len(path)-1], ""
}
}