mirror of
https://git.sr.ht/~joren/streamrip-go
synced 2026-06-17 15:05:39 +02:00
feat: implement second level of verbosity
This commit is contained in:
@@ -24,7 +24,7 @@ type globalOptions struct {
|
||||
codec string
|
||||
noProgress bool
|
||||
noSSLVerify bool
|
||||
verbose bool
|
||||
verbose int
|
||||
command string
|
||||
commandArgs []string
|
||||
}
|
||||
@@ -52,7 +52,13 @@ func parseGlobalArgs(args []string) (globalOptions, error) {
|
||||
case arg == "--no-ssl-verify":
|
||||
opts.noSSLVerify = true
|
||||
case arg == "-v" || arg == "--verbose":
|
||||
opts.verbose = true
|
||||
if opts.verbose < 2 {
|
||||
opts.verbose++
|
||||
}
|
||||
case arg == "-vv":
|
||||
if opts.verbose < 2 {
|
||||
opts.verbose = 2
|
||||
}
|
||||
case arg == "-f" || arg == "--folder":
|
||||
if i+1 >= len(args) {
|
||||
return globalOptions{}, fmt.Errorf("%s requires a value", arg)
|
||||
|
||||
Reference in New Issue
Block a user