We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 41009f3 commit 388c586Copy full SHA for 388c586
server/commands/Df.go
@@ -14,7 +14,7 @@ func (command Command) Df() ([]string, error){
14
15
func df() ([]string, error) {
16
settings := cfg.GetSettings()
17
- rootNames := []string{}
+ rootNames := make([]string, 0)
18
for i := 0; i < len(settings.Roots); i++ {
19
rootNames = append(rootNames, settings.Roots[i].Name)
20
}
server/commands/Ls.go
@@ -19,7 +19,7 @@ func ls(directory string) ([]File, error) {
21
files, _ := ioutil.ReadDir(path)
22
- var response []File
+ response := make([]File, 0)
23
24
for _, file := range files {
25
f := File{Name: file.Name(), Size: file.Size(), Modified: file.ModTime()}
0 commit comments