mirror of
https://github.com/pikami/tiktok-dl.git
synced 2026-01-06 02:56:57 +00:00
Added debug option
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user