Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
jub0t committed May 19, 2023
1 parent 8c9cb4d commit f89bb30
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
21 changes: 21 additions & 0 deletions handlers/info.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package handlers

import (
"fmt"
"os"

"github.com/urfave/cli/v2"
)

func Info(cCtx *cli.Context) error {
dirs, err := os.ReadDir("./downloads")

if err != nil {
print("Error occured while getting downloads")
return err
}

fmt.Println(fmt.Sprintf("Downloaded Clothing: %v", len(dirs)))

return nil
}
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func main() {
Name: "info",
Usage: "Display information about the cli.",
Action: func(cCtx *cli.Context) error {
// Database & Downloaded info
handlers.Info(cCtx)
return nil
},
},
Expand Down

0 comments on commit f89bb30

Please sign in to comment.