Added debug option

This commit is contained in:
Pijus Kamandulis committed 2020-01-19 16:43:32 +02:00
1 parent 2b56584b1b
commit 38c23fd9f5
3 files changed
+5 -1

No files matched your search

+3
View File
@@ -10,11 +10,13 @@ import (
var Config struct {
UserName string
OutputPath string
Debug bool
}
// GetConfig - Returns Config object
func GetConfig() {
outputPath := flag.String("output", "./downloads", "Output path")
debug := flag.Bool("debug", false, "enables debug mode")
flag.Parse()
args := flag.Args()
@@ -25,4 +27,5 @@ func GetConfig() {
Config.UserName = flag.Args()[len(args)-1]
Config.OutputPath = *outputPath
Config.Debug = *debug
}