Conditions | 4 |
Total Lines | 18 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | package main |
||
11 | func TaskPrint() error { |
||
|
|||
12 | downloading, err := ioutil.ReadDir(filepath.Join(os.Getenv("HOME"), dataFolder)) |
||
13 | if err != nil { |
||
14 | return err |
||
15 | } |
||
16 | |||
17 | folders := make([]string, 0) |
||
18 | for _, d := range downloading { |
||
19 | if d.IsDir() { |
||
20 | folders = append(folders, d.Name()) |
||
21 | } |
||
22 | } |
||
23 | |||
24 | folderString := strings.Join(folders, "\n") |
||
25 | Printf("Currently on going download: \n") |
||
26 | fmt.Println(folderString) |
||
27 | |||
28 | return nil |
||
29 | } |
||
34 |