feat: implement second level of verbosity

This commit is contained in:
lb-a
2026-05-07 18:45:36 +02:00
parent 04cc56040b
commit 3909ba5113
3 changed files with 15 additions and 5 deletions

View File

@@ -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)